{
  "openapi": "3.0.1",
  "info": {
    "title": "Merrows Edge API",
    "description": "Public API for building on the Merrows platform: conversations, analytics, transcripts, experiments, telephony, email/SMS templates, and integration management.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.merrows.ai",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/actions": {
      "get": {
        "tags": [
          "Actions"
        ],
        "summary": "Lists all active action definitions. Optionally filter by domain.",
        "operationId": "Actions_ListActions",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analytics/tenants/{tenantSlug}/csat": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Merchant-facing CSAT rollup. Customer votes and AI estimates are\r\nreturned as separate, scale-labelled metrics and are never averaged\r\ntogether or across unlike scales.",
        "operationId": "Analytics_GetCsat",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skill",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation_set",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "low"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analytics/tenants/{tenantSlug}/calls": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Retrieves call analytics data for a specific tenant based on a set of query parameters.\r\nThis endpoint allows filtering calls by date range, flow ID, outcome, language, and translation status.",
        "operationId": "Analytics_GetCalls",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Optional. The start date and time for the query range. If not provided, defaults to the beginning of time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Optional. The end date and time for the query range. If not provided, defaults to the current time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "flow_id",
            "in": "query",
            "description": "Optional. The ID of the flow to filter calls by.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "description": "Optional. The outcome of the call to filter by (e.g., \"completed\", \"abandoned\").",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "caller_language",
            "in": "query",
            "description": "Optional. The language used by the caller.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "translation_enabled",
            "in": "query",
            "description": "Optional. A boolean indicating whether translation was enabled for the call.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "channel_type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provenance",
            "in": "query",
            "description": "Optional (#2058). \"all\" (default, unchanged behaviour), \"executed\" for documents a channel actually wrote, or \"unattributed\" for documents nobody vouched for.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analytics/tenants/{tenantSlug}/automation-rate": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "#514 automation-rate KPI: per-task outcomes from the #512 scoring\r\npipeline rolled into automation / bot-failure / abandonment rates\r\n(appropriate escalations excluded from the denominator per the #509\r\nmetric contract), totalled, by UTC day, and by channel. Observational —\r\nevery cell traces back to scored tasks via the tasks endpoint below.",
        "operationId": "Analytics_GetAutomationRate",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analytics/tenants/{tenantSlug}/automation-rate/tasks": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Drill-down for the KPI: the scored tasks behind a rate cell, filterable\r\nby outcome/channel, newest first. Each row links to the conversation\r\ntranscript via conversation_id (= the analytics CallId) and carries the\r\ntask's turn span.",
        "operationId": "Analytics_GetAutomationTasks",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "handoff",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analytics/tenants/{tenantSlug}/automation-rate/work": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "What the scored tasks in the window did, for the owner's analytics\r\npage: tasks that completed each kind of action (an order placed, a\r\nreturn opened, an appointment booked), and escalated tasks by how the\r\nhandoff ended. Counts are tasks, in the same window and filters as\r\nautomation-rate, and each one drills through automation-rate/tasks\r\nwith `action` or `handoff`. A handoff that stopped at the\r\nbusiness's own setup is reported as such, never as completed work.",
        "operationId": "Analytics_GetAutomationWork",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/api-keys": {
      "post": {
        "tags": [
          "ApiKeys"
        ],
        "summary": "Create a tenant-scoped API key",
        "operationId": "ApiKeys_CreateTenantKey",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "ApiKeys"
        ],
        "summary": "List API keys for a tenant",
        "operationId": "ApiKeys_ListTenantKeys",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/api-keys/{keyId}": {
      "delete": {
        "tags": [
          "ApiKeys"
        ],
        "summary": "Revoke a tenant API key",
        "operationId": "ApiKeys_RevokeTenantKey",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/summary": {
      "get": {
        "tags": [
          "Billing"
        ],
        "operationId": "Billing_GetSummary",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSummaryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSummaryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSummaryDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/plans": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "The plans and the channel add-ons (#2780).",
        "operationId": "Billing_GetPlans",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PlansCatalogueDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlansCatalogueDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlansCatalogueDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/reload-packs": {
      "get": {
        "tags": [
          "Billing"
        ],
        "operationId": "Billing_GetReloadPacks",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReloadPackDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReloadPackDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReloadPackDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/checkout/subscription": {
      "post": {
        "tags": [
          "Billing"
        ],
        "operationId": "Billing_StartSubscriptionCheckout",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCheckoutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCheckoutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartCheckoutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/checkout/reload": {
      "post": {
        "tags": [
          "Billing"
        ],
        "operationId": "Billing_StartReloadCheckout",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartReloadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartReloadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartReloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/portal-session": {
      "post": {
        "tags": [
          "Billing"
        ],
        "operationId": "Billing_CreatePortalSession",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/subscription/plan": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Move a live subscription to another plan through Stripe's subscription\r\nupdate API (#2780). Upgrades are prorated now; downgrades take effect\r\nnext period. Never opens a second Checkout.",
        "operationId": "Billing_ChangePlan",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/addons": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Add a channel add-on (voice, SMS or the phone line) to a live subscription (#2780).",
        "operationId": "Billing_AddAddon",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAddonRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAddonRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddAddonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/billing/addons/{addonSlug}": {
      "delete": {
        "tags": [
          "Billing"
        ],
        "summary": "Remove a channel add-on (#2780). The channel stays on until the paid\r\nperiod ends; the number is held for 90 days after that.",
        "operationId": "Billing_RemoveAddon",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "addonSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blaze/connections": {
      "get": {
        "tags": [
          "BlazeConnection"
        ],
        "summary": "Get the current Blaze connection for a tenant.",
        "operationId": "BlazeConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BlazeConnection"
        ],
        "summary": "Connect Blaze to a tenant. Validates the keys against GET /partner/store\r\nand stores both encrypted; registers order webhooks best-effort when the\r\nenvironment has a callback base URL configured.",
        "operationId": "BlazeConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectBlazeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectBlazeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectBlazeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "BlazeConnection"
        ],
        "summary": "Disconnect Blaze from a tenant.",
        "operationId": "BlazeConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blaze/connections/test": {
      "post": {
        "tags": [
          "BlazeConnection"
        ],
        "summary": "Test the Blaze connection by calling GET /partner/store with the stored keys.",
        "operationId": "BlazeConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/integrations/booking": {
      "get": {
        "tags": [
          "BookingConnection"
        ],
        "summary": "Get the tenant's current booking connection (200 with null body if unconfigured).",
        "operationId": "BookingConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BookingConnection"
        ],
        "summary": "Connect a booking provider. Encrypts + stores credentials and sets the active provider.",
        "operationId": "BookingConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectBookingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectBookingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectBookingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "BookingConnection"
        ],
        "summary": "Disconnect the tenant's booking provider and clear the active provider.",
        "operationId": "BookingConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capabilities": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "operationId": "Capabilities_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capabilities/{capabilityName}": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "operationId": "Capabilities_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Capabilities"
        ],
        "operationId": "Capabilities_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CapabilityOverrideRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CapabilityOverrideRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CapabilityOverrideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Capabilities"
        ],
        "operationId": "Capabilities_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List all conversations for a tenant.",
        "operationId": "Conversations_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Create a new draft conversation.",
        "operationId": "Conversations_CreateDraft",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{slugOrId}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get a specific conversation by slug or ID (returns latest version).",
        "operationId": "Conversations_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slugOrId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Conversations"
        ],
        "summary": "Update an existing draft conversation.",
        "operationId": "Conversations_UpdateDraft",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slugOrId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversationDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{slugOrId}/publish": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Publish a draft conversation, creating a new immutable version.",
        "operationId": "Conversations_Publish",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slugOrId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishConversationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishConversationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublishConversationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{slug}": {
      "delete": {
        "tags": [
          "Conversations"
        ],
        "summary": "Delete a never-published draft conversation (#354). Published conversations\r\nreturn 409; create-and-abandon drafts are the only hard-deletable state.",
        "operationId": "Conversations_DeleteDraft",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{slug}/versions": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List all versions for a conversation slug.",
        "operationId": "Conversations_ListVersions",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{slug}/versions/{fromVersion}/diff/{toVersion}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Compute a structural diff between two versions of a conversation.",
        "operationId": "Conversations_DiffVersions",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromVersion",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "toVersion",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{slug}/versions/{version}/rollback": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Rollback a conversation to a specific version, creating a new version with the target's definition.",
        "operationId": "Conversations_Rollback",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RollbackConversationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RollbackConversationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RollbackConversationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversation-settings": {
      "get": {
        "tags": [
          "ConversationSettings"
        ],
        "summary": "Retrieves the conversation settings for a specific tenant.\r\nThis includes settings like dead-air thresholds, TTS chunk thresholds, and global DTMF overrides.",
        "operationId": "ConversationSettings_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "ConversationSettings"
        ],
        "summary": "Creates or updates the conversation settings for a specific tenant.\r\nThis allows for fine-tuning conversation behavior and DTMF handling.",
        "operationId": "ConversationSettings_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the settings to create or update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversation-settings/clarification": {
      "get": {
        "tags": [
          "ConversationSettings"
        ],
        "summary": "Retrieves the menu item clarification settings for a specific tenant.\r\nControls how the bot handles variations, modifiers, and ambiguous item matches.",
        "operationId": "ConversationSettings_GetClarificationSettings",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "ConversationSettings"
        ],
        "summary": "Updates the menu item clarification settings for a specific tenant.\r\nOnly provided fields will be updated; others retain their current values.",
        "operationId": "ConversationSettings_UpdateClarificationSettings",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The clarification settings to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClarificationSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClarificationSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClarificationSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/calls/{callId}/transcript": {
      "get": {
        "tags": [
          "ConversationTranscripts"
        ],
        "summary": "Retrieves the transcript for a specific call.\r\nThe transcript can be filtered by speaker and turn number, and returned in either a compact or verbose format.",
        "operationId": "ConversationTranscripts_GetTranscript",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "description": "The unique identifier of the call.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The format of the transcript. Can be 'compact' (default) or 'verbose'.",
            "schema": {
              "type": "string",
              "default": "compact"
            }
          },
          {
            "name": "speaker",
            "in": "query",
            "description": "The speaker to filter by. Can be 'all' (default), 'user', or 'bot'.",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "startTurn",
            "in": "query",
            "description": "Optional. The starting turn number to include in the transcript.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "endTurn",
            "in": "query",
            "description": "Optional. The ending turn number to include in the transcript.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/calls/{callId}/transcript/session": {
      "get": {
        "tags": [
          "ConversationTranscripts"
        ],
        "summary": "Retrieves the session summary for a specific call.\r\nThe session summary contains metadata about the conversation, such as the start and end times, duration, and outcome.",
        "operationId": "ConversationTranscripts_GetSession",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "callId",
            "in": "path",
            "description": "The unique identifier of the call.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/conversations/{conversationSlug}/tts-settings": {
      "get": {
        "tags": [
          "ConversationTtsSettings"
        ],
        "summary": "Gets the TTS settings for a conversation, optionally pinned to a version.\r\nReturns the version-specific row if it exists, otherwise the version-agnostic row.",
        "operationId": "ConversationTtsSettings_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ConversationTtsSettings"
        ],
        "summary": "Creates or updates TTS settings for a conversation.\r\nOnly provided (non-null) fields are written; omitted fields retain their current value on update.",
        "operationId": "ConversationTtsSettings_Upsert",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationTtsSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationTtsSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationTtsSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ConversationTtsSettings"
        ],
        "summary": "Removes conversation-level TTS settings, reverting to the tenant default.",
        "operationId": "ConversationTtsSettings_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-conversations": {
      "get": {
        "tags": [
          "EmailConversations"
        ],
        "operationId": "EmailConversations_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-conversations/{id}": {
      "get": {
        "tags": [
          "EmailConversations"
        ],
        "operationId": "EmailConversations_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-conversations/{id}/reply": {
      "post": {
        "tags": [
          "EmailConversations"
        ],
        "operationId": "EmailConversations_Reply",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailConversationsController.ReplyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailConversationsController.ReplyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmailConversationsController.ReplyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-conversations/{id}/close": {
      "post": {
        "tags": [
          "EmailConversations"
        ],
        "operationId": "EmailConversations_Close",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-conversations/{id}/escalate": {
      "post": {
        "tags": [
          "EmailConversations"
        ],
        "summary": "Escalate an email conversation to the helpdesk provider.\r\nBuilds transcript from the full message thread and creates a helpdesk ticket.",
        "operationId": "EmailConversations_Escalate",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-deliveries": {
      "get": {
        "tags": [
          "EmailDelivery"
        ],
        "summary": "List email delivery logs with optional filters.",
        "operationId": "EmailDelivery_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-deliveries/{id}": {
      "get": {
        "tags": [
          "EmailDelivery"
        ],
        "summary": "Get a single delivery log entry.",
        "operationId": "EmailDelivery_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-deliveries/stats": {
      "get": {
        "tags": [
          "EmailDelivery"
        ],
        "summary": "Get aggregate delivery stats for a tenant.",
        "operationId": "EmailDelivery_Stats",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-settings": {
      "get": {
        "tags": [
          "EmailSettings"
        ],
        "summary": "Get current email settings for a tenant",
        "operationId": "EmailSettings_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "EmailSettings"
        ],
        "summary": "Update email settings for a tenant. The inbound routing address is NOT\r\nwritable here (#1361): it is the identity the webhook matches inbound\r\nmail against, and the old single-column design let the editable\r\nreply-from field silently overwrite it. Custom inbound addresses are an\r\noperator concern; reply-from is the merchant-facing setting.",
        "operationId": "EmailSettings_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsController.UpdateEmailSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsController.UpdateEmailSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsController.UpdateEmailSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-settings/inbound-emails": {
      "get": {
        "tags": [
          "EmailSettings"
        ],
        "summary": "List recent inbound emails for a tenant",
        "operationId": "EmailSettings_ListInboundEmails",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-settings/verify-forwarding": {
      "post": {
        "tags": [
          "EmailSettings"
        ],
        "summary": "Start email forwarding verification — sends a verification email to the\r\nexternal address. When that address is forwarded to the tenant's inbound\r\naddress the webhook auto-detects the token and marks the verification complete.",
        "operationId": "EmailSettings_StartForwardingVerification",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsController.StartVerificationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsController.StartVerificationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsController.StartVerificationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "EmailSettings"
        ],
        "summary": "Get forwarding verification status for a tenant",
        "operationId": "EmailSettings_GetVerificationStatus",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-settings/setup-guide": {
      "get": {
        "tags": [
          "EmailSettings"
        ],
        "summary": "Get provider-specific email forwarding setup guide",
        "operationId": "EmailSettings_GetSetupGuide",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-templates": {
      "get": {
        "tags": [
          "EmailTemplates"
        ],
        "operationId": "EmailTemplates_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "EmailTemplates"
        ],
        "operationId": "EmailTemplates_Create",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmailTemplateDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmailTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmailTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-templates/{id}": {
      "get": {
        "tags": [
          "EmailTemplates"
        ],
        "operationId": "EmailTemplates_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "EmailTemplates"
        ],
        "operationId": "EmailTemplates_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmailTemplateDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmailTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmailTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "EmailTemplates"
        ],
        "operationId": "EmailTemplates_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-templates/{id}/preview": {
      "post": {
        "tags": [
          "EmailTemplates"
        ],
        "summary": "Render a template with sample variables and return the branded HTML preview.",
        "operationId": "EmailTemplates_Preview",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-templates/{id}/send-test": {
      "post": {
        "tags": [
          "EmailTemplates"
        ],
        "summary": "Send a test email using this template.",
        "operationId": "EmailTemplates_SendTest",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailTemplatesController.SendTestEmailRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailTemplatesController.SendTestEmailRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmailTemplatesController.SendTestEmailRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/embed": {
      "get": {
        "tags": [
          "EmbedConnection"
        ],
        "operationId": "EmbedConnection_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConnectionStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConnectionStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConnectionStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "EmbedConnection"
        ],
        "operationId": "EmbedConnection_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbedConnectionUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbedConnectionUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmbedConnectionUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConnectionStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConnectionStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConnectionStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/embed/key": {
      "post": {
        "tags": [
          "EmbedConnection"
        ],
        "operationId": "EmbedConnection_CreateOrRotateKey",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedKeyCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedKeyCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedKeyCreatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/embed/analytics": {
      "get": {
        "tags": [
          "EmbedConnection"
        ],
        "summary": "Embed usage rollup (#830): sessions/messages/top-origins from the\r\nMongo analytics documents stamped Source = \"website_embed\". Message\r\ncounts cover persisted (ended) sessions only; live sessions appear in\r\nthe session count with 0 messages until their transcript persists.",
        "operationId": "EmbedConnection_GetAnalytics",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 7
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments": {
      "get": {
        "tags": [
          "Experiments"
        ],
        "summary": "List all experiments for a tenant, including variant counts.",
        "operationId": "Experiments_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Experiments"
        ],
        "summary": "Create a new experiment in draft status.",
        "operationId": "Experiments_Create",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExperimentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExperimentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExperimentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}": {
      "get": {
        "tags": [
          "Experiments"
        ],
        "summary": "Get experiment details including variants and assignment counts.",
        "operationId": "Experiments_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Experiments"
        ],
        "summary": "Update a draft experiment. Returns 409 if not in draft status.",
        "operationId": "Experiments_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExperimentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExperimentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExperimentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Experiments"
        ],
        "summary": "Delete a draft experiment.",
        "operationId": "Experiments_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/variants": {
      "post": {
        "tags": [
          "Experiments"
        ],
        "summary": "Add a variant to an experiment.",
        "operationId": "Experiments_AddVariant",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVariantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVariantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVariantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/variants/{variantId}": {
      "put": {
        "tags": [
          "Experiments"
        ],
        "summary": "Update a variant.",
        "operationId": "Experiments_UpdateVariant",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVariantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVariantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVariantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Experiments"
        ],
        "summary": "Remove a variant.",
        "operationId": "Experiments_DeleteVariant",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/start": {
      "post": {
        "tags": [
          "Experiments"
        ],
        "summary": "Start an experiment. Validates: weights sum to 100, >= 2 variants, no other running experiment for tenant.",
        "operationId": "Experiments_Start",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/pause": {
      "post": {
        "tags": [
          "Experiments"
        ],
        "summary": "Pause a running experiment.",
        "operationId": "Experiments_Pause",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/resume": {
      "post": {
        "tags": [
          "Experiments"
        ],
        "summary": "Resume a paused experiment.",
        "operationId": "Experiments_Resume",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/conclude": {
      "post": {
        "tags": [
          "Experiments"
        ],
        "summary": "Conclude an experiment with an optional winning variant.\r\nIf promoteWinner is true, updates the TenantConversationAssignment.",
        "operationId": "Experiments_Conclude",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConcludeExperimentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConcludeExperimentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConcludeExperimentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/experiments/{experimentId}/results": {
      "get": {
        "tags": [
          "Experiments"
        ],
        "summary": "Get assignment counts per variant for an experiment.",
        "operationId": "Experiments_Results",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/gladly/connections": {
      "get": {
        "tags": [
          "GladlyConnection"
        ],
        "summary": "Get the current Gladly connection for a tenant.",
        "operationId": "GladlyConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "GladlyConnection"
        ],
        "summary": "Connect Gladly to a tenant. Encrypts and stores credentials.\r\nOptionally registers webhook with Gladly.",
        "operationId": "GladlyConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGladlyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGladlyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGladlyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "GladlyConnection"
        ],
        "summary": "Disconnect Gladly from a tenant.",
        "operationId": "GladlyConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/gladly/connections/test": {
      "post": {
        "tags": [
          "GladlyConnection"
        ],
        "summary": "Test the Gladly connection by calling the agents endpoint.",
        "operationId": "GladlyConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/gorgias/connections": {
      "get": {
        "tags": [
          "GorgiasConnection"
        ],
        "summary": "Get the current Gorgias connection for a tenant.",
        "operationId": "GorgiasConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "GorgiasConnection"
        ],
        "summary": "Connect Gorgias to a tenant. Encrypts and stores credentials.",
        "operationId": "GorgiasConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGorgiasRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGorgiasRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGorgiasRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "GorgiasConnection"
        ],
        "summary": "Disconnect Gorgias from a tenant.",
        "operationId": "GorgiasConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/gorgias/connections/test": {
      "post": {
        "tags": [
          "GorgiasConnection"
        ],
        "summary": "Test the Gorgias connection by calling the account endpoint.",
        "operationId": "GorgiasConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/escalate": {
      "post": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "Manually escalate to helpdesk from the portal.",
        "operationId": "Helpdesk_Escalate",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HelpdeskEscalationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/HelpdeskEscalationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/HelpdeskEscalationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/conversations": {
      "get": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "List conversation links (escalation history) for the tenant.",
        "operationId": "Helpdesk_ListConversations",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/conversations/{id}": {
      "get": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "Get a single conversation link by ID.",
        "operationId": "Helpdesk_GetConversation",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/conversations/{conversationId}/notes": {
      "post": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "Add a note to an existing helpdesk conversation.",
        "operationId": "Helpdesk_AddNote",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/inboxes": {
      "get": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "List inboxes from the helpdesk provider.",
        "operationId": "Helpdesk_ListInboxes",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/agents": {
      "get": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "List agents from the helpdesk provider.",
        "operationId": "Helpdesk_ListAgents",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/reports": {
      "post": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "Create a report export job.",
        "operationId": "Helpdesk_CreateReport",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/helpdesk/reports/{jobId}": {
      "get": {
        "tags": [
          "Helpdesk"
        ],
        "summary": "Check status of a report job.",
        "operationId": "Helpdesk_GetReportStatus",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/integrations/capabilities": {
      "get": {
        "tags": [
          "IntegrationCapabilities"
        ],
        "operationId": "IntegrationCapabilities_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/intent-catalog": {
      "get": {
        "tags": [
          "IntentCatalog"
        ],
        "summary": "Returns the full system intent catalog for this tenant's type,\r\nincluding override metadata (enabled/disabled, custom description/examples).",
        "operationId": "IntentCatalog_GetCatalog",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/intent-catalog/{intentName}/override": {
      "put": {
        "tags": [
          "IntentCatalog"
        ],
        "summary": "Creates or updates a per-tenant override for a system intent.\r\nUse this to enable/disable intents or customize their description/examples.",
        "operationId": "IntentCatalog_UpsertOverride",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "intentName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentOverrideRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentOverrideRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IntentOverrideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "IntentCatalog"
        ],
        "summary": "Removes a per-tenant override for a system intent, resetting it to system defaults.",
        "operationId": "IntentCatalog_DeleteOverride",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "intentName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/kustomer/connections": {
      "get": {
        "tags": [
          "KustomerConnection"
        ],
        "summary": "Get the current Kustomer connection for a tenant.",
        "operationId": "KustomerConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "KustomerConnection"
        ],
        "summary": "Connect Kustomer to a tenant. Encrypts and stores the API token.",
        "operationId": "KustomerConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectKustomerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectKustomerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectKustomerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "KustomerConnection"
        ],
        "summary": "Disconnect Kustomer from a tenant.",
        "operationId": "KustomerConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/kustomer/connections/test": {
      "post": {
        "tags": [
          "KustomerConnection"
        ],
        "summary": "Test the Kustomer connection by calling the current user endpoint.",
        "operationId": "KustomerConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/llm-prompts": {
      "get": {
        "tags": [
          "LlmPrompts"
        ],
        "operationId": "LlmPrompts_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/llm-prompts/{promptKey}": {
      "get": {
        "tags": [
          "LlmPrompts"
        ],
        "operationId": "LlmPrompts_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "promptKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "LlmPrompts"
        ],
        "operationId": "LlmPrompts_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "promptKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LlmPromptOverrideRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LlmPromptOverrideRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LlmPromptOverrideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "LlmPrompts"
        ],
        "operationId": "LlmPrompts_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "promptKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/meadow/connections": {
      "get": {
        "tags": [
          "MeadowConnection"
        ],
        "summary": "Get the current Meadow connection for a tenant.",
        "operationId": "MeadowConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "MeadowConnection"
        ],
        "summary": "Connect Meadow to a tenant. Validates the keys and stores them encrypted.",
        "operationId": "MeadowConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMeadowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMeadowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMeadowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "MeadowConnection"
        ],
        "summary": "Disconnect Meadow from a tenant.",
        "operationId": "MeadowConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/meadow/connections/test": {
      "post": {
        "tags": [
          "MeadowConnection"
        ],
        "summary": "Test the Meadow connection by calling the organization endpoint.",
        "operationId": "MeadowConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders/{orderId}": {
      "get": {
        "tags": [
          "Oms"
        ],
        "summary": "Get order details with fulfillments and tracking info",
        "operationId": "Oms_GetOrder",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders": {
      "get": {
        "tags": [
          "Oms"
        ],
        "summary": "Search orders by email, phone, name, or status",
        "operationId": "Oms_SearchOrders",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "financialStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fulfillmentStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders/{orderId}/cancel": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Cancel an order (irreversible)",
        "operationId": "Oms_CancelOrder",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsCancelRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsCancelRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OmsCancelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders/{orderId}/return": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Create a return request for an order.\r\nReturns 409 if tenant uses Redo as returns provider.",
        "operationId": "Oms_CreateReturn",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsReturnRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OmsReturnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders/{orderId}/return/process": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Process/confirm a return (disposition + refund).\r\nReturns 409 if tenant uses Redo as returns provider.",
        "operationId": "Oms_ProcessReturn",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsProcessReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsProcessReturnRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OmsProcessReturnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders/{orderId}/return/calculate": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Preview return financials before creating.\r\nReturns 409 if tenant uses Redo as returns provider.",
        "operationId": "Oms_CalculateReturn",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsReturnRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OmsReturnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/orders/{orderId}/exchange": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Create an exchange (return items + ship new items).\r\nReturns 409 if tenant uses Redo as returns provider.",
        "operationId": "Oms_CreateExchange",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsExchangeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OmsExchangeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OmsExchangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions": {
      "get": {
        "tags": [
          "Oms"
        ],
        "summary": "List subscriptions for a customer",
        "operationId": "Oms_ListSubscriptions",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}": {
      "get": {
        "tags": [
          "Oms"
        ],
        "summary": "Get subscription details",
        "operationId": "Oms_GetSubscription",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}/pause": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Pause a subscription",
        "operationId": "Oms_PauseSubscription",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}/resume": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Resume a paused subscription",
        "operationId": "Oms_ResumeSubscription",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}/cancel": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Cancel a subscription",
        "operationId": "Oms_CancelSubscription",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}/skip": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Skip the next shipment/charge on a subscription (#1507).\r\nReturns 501 when the resolved provider has no skip support (OMS bridge).",
        "operationId": "Oms_SkipNextShipment",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}/unskip": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Restore a previously skipped shipment/charge on a subscription (#1507).\r\nReturns 501 when the resolved provider has no skip support (OMS bridge).",
        "operationId": "Oms_UnskipShipment",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/oms/subscriptions/{subscriptionId}/swap": {
      "post": {
        "tags": [
          "Oms"
        ],
        "summary": "Swap the product variant on a subscription (#1507).\r\nReturns 501 when the resolved provider has no swap support (OMS bridge).",
        "operationId": "Oms_SwapSubscriptionVariant",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwapSubscriptionVariantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SwapSubscriptionVariantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SwapSubscriptionVariantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/calls/outbound": {
      "post": {
        "tags": [
          "OutboundCalls"
        ],
        "operationId": "OutboundCalls_InitiateCall",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OutboundCallRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OutboundCallRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OutboundCallRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/calls/outbound/{callId}/status": {
      "get": {
        "tags": [
          "OutboundCalls"
        ],
        "operationId": "OutboundCalls_GetStatus",
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboundCallStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/calls/outbound/{callId}/hangup": {
      "post": {
        "tags": [
          "OutboundCalls"
        ],
        "operationId": "OutboundCalls_Hangup",
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/payments/orders/create-with-payment-link": {
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "Creates an order with a list of items and sends a payment link to the customer via SMS.",
        "operationId": "Payment_CreateOrderWithPaymentLink",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "Business slug identifying the tenant context.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the order details, including items and customer information.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderWithPaymentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderWithPaymentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderWithPaymentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/payments/quick-payment-link": {
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "Creates a quick payment link for a simple amount and sends it to the customer via SMS.",
        "operationId": "Payment_CreateQuickPaymentLink",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "Business slug identifying the tenant context.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the amount, currency, and customer information.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickPaymentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickPaymentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/QuickPaymentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/payments/payment-links/{paymentLinkId}/status": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Retrieves the status of a specific payment link.",
        "operationId": "Payment_GetPaymentLinkStatus",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "Business slug identifying the tenant context.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentLinkId",
            "in": "path",
            "description": "The unique identifier of the payment link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "description": "The ID of the location where the payment link was created.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/payments/voice-order": {
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "An example endpoint demonstrating how a voice order can be processed and converted into a payment link.",
        "operationId": "Payment_ProcessVoiceOrder",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "Business slug identifying the tenant context.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the details of the voice order.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceOrderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceOrderRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/pos/menu": {
      "get": {
        "tags": [
          "Pos"
        ],
        "summary": "Retrieves the menu for a specific tenant and location from the configured Point of Sale (POS) system.",
        "operationId": "Pos_GetMenu",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "description": "Optional. The specific location ID to retrieve the menu for. If not provided, the tenant's default POS location ID will be used.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "description": "If true, include deleted catalog objects in the response.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/pos/orders": {
      "post": {
        "tags": [
          "Pos"
        ],
        "summary": "Creates a new order in the Point of Sale (POS) system for a specific tenant.",
        "operationId": "Pos_CreateOrder",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the details of the order to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePosOrderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePosOrderRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePosOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/pos/orders/{orderId}": {
      "get": {
        "tags": [
          "Pos"
        ],
        "summary": "Retrieves a specific order from the Point of Sale (POS) system.",
        "operationId": "Pos_GetOrder",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique slug identifying the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "description": "The unique identifier of the order to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/posabit/connections": {
      "get": {
        "tags": [
          "PosabitConnection"
        ],
        "summary": "Get the current POSaBIT connection for a tenant.",
        "operationId": "PosabitConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PosabitConnection"
        ],
        "summary": "Connect POSaBIT to a tenant. Validates the venue credentials and stores encrypted.",
        "operationId": "PosabitConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectPosabitRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectPosabitRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectPosabitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "PosabitConnection"
        ],
        "summary": "Disconnect POSaBIT from a tenant.",
        "operationId": "PosabitConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/posabit/connections/test": {
      "post": {
        "tags": [
          "PosabitConnection"
        ],
        "summary": "Test the POSaBIT connection by calling the venue info endpoint.",
        "operationId": "PosabitConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/recharge/connections": {
      "get": {
        "tags": [
          "RechargeConnection"
        ],
        "summary": "Get the current Recharge connection for a tenant.",
        "operationId": "RechargeConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "RechargeConnection"
        ],
        "summary": "Connect Recharge to a tenant. Verifies the token against the live API\r\nfirst, then encrypts and stores it.",
        "operationId": "RechargeConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRechargeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRechargeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRechargeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "RechargeConnection"
        ],
        "summary": "Disconnect Recharge from a tenant (soft: the row survives for revive).",
        "operationId": "RechargeConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/recharge/connections/test": {
      "post": {
        "tags": [
          "RechargeConnection"
        ],
        "summary": "Test the stored Recharge connection with an authenticated store read.",
        "operationId": "RechargeConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/recharge/connections/settings": {
      "put": {
        "tags": [
          "RechargeConnection"
        ],
        "summary": "Update the display-only settings on the active connection.",
        "operationId": "RechargeConnection_UpdateSettings",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRechargeSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRechargeSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRechargeSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/redo/connections": {
      "get": {
        "tags": [
          "RedoConnection"
        ],
        "summary": "Get the current Redo connection for a tenant",
        "operationId": "RedoConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "RedoConnection"
        ],
        "summary": "Connect Redo to a tenant. Encrypts and stores API token, store ID, and webhook secret.\r\nOptionally registers webhook with Redo API.",
        "operationId": "RedoConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRedoRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRedoRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRedoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "RedoConnection"
        ],
        "summary": "Disconnect Redo from a tenant",
        "operationId": "RedoConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/returns": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "List return cases for a tenant, with optional filters.",
        "operationId": "Returns_ListReturnCases",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyOrderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/returns/{returnId}": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Get a single return case by its external return ID, with event history.",
        "operationId": "Returns_GetReturnCase",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/returns/{returnId}/status": {
      "put": {
        "tags": [
          "Returns"
        ],
        "summary": "Update the status of a return via the returns provider, then update local mirror.\r\nValid target statuses: complete, open, flagged, rejected, deleted.",
        "operationId": "Returns_UpdateReturnStatus",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnStatusUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnStatusUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnStatusUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/returns/portal-link": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Get the customer return portal URL for this tenant.",
        "operationId": "Returns_GetPortalLink",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/shopify/connections": {
      "get": {
        "tags": [
          "ShopifyConnection"
        ],
        "summary": "Get the current Shopify connection for a tenant",
        "operationId": "ShopifyConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ShopifyConnection"
        ],
        "summary": "Connect a Shopify store to a tenant using OAuth 2.0 client credentials.\r\nExchanges client ID + secret for an access token, validates via GraphQL shop query,\r\nstores encrypted credentials, and registers webhooks.",
        "operationId": "ShopifyConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectShopifyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectShopifyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectShopifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ShopifyConnection"
        ],
        "summary": "Disconnect a Shopify store from a tenant",
        "operationId": "ShopifyConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/shopify/connections/claim": {
      "post": {
        "tags": [
          "ShopifyConnection"
        ],
        "summary": "Attach an install the merchant approved on Shopify to this tenant.\r\n            \r\nThe install ran OAuth before the merchant signed in (App Store\r\nrequirement 2.3.2), so the callback could not know the workspace and\r\nparked the grant under a claim token. The token is single use and\r\nexpires after Edge.API.Shopify.ShopifyOAuthStart.ClaimTtl. A claim that is\r\nrefused for a reason the merchant can fix (the workspace already holds\r\nanother store, or another business holds this one) is put back for the\r\nrest of its lifetime, so the merchant can fix it and retry without\r\ninstalling again.",
        "operationId": "ShopifyConnection_Claim",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimShopifyInstallRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimShopifyInstallRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimShopifyInstallRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/shopify/connections/reauthorize": {
      "get": {
        "tags": [
          "ShopifyConnection"
        ],
        "summary": "The consent URL for the store this tenant already holds, for a\r\nreconnect after Shopify stopped accepting its token. Only the stored\r\nshop is ever used: the tenant cannot name another store here, and the\r\ncaller must be allowed to manage this tenant's integrations. This\r\nreplaces the anonymous /api/shopify/oauth/authorize, which took any\r\ntenant slug and any shop from anyone.",
        "operationId": "ShopifyConnection_Reauthorize",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/sms-settings": {
      "get": {
        "tags": [
          "SmsSettings"
        ],
        "summary": "Current inbound texting settings for a tenant.",
        "operationId": "SmsSettings_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "SmsSettings"
        ],
        "summary": "Update inbound texting settings for a tenant. A field you omit keeps\r\nits stored value; an empty conversation slug clears it.",
        "operationId": "SmsSettings_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsSettingsController.UpdateSmsSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsSettingsController.UpdateSmsSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SmsSettingsController.UpdateSmsSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/sms-templates": {
      "get": {
        "tags": [
          "SmsTemplates"
        ],
        "operationId": "SmsTemplates_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "SmsTemplates"
        ],
        "operationId": "SmsTemplates_Create",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSmsTemplateDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSmsTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSmsTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/sms-templates/{id}": {
      "get": {
        "tags": [
          "SmsTemplates"
        ],
        "operationId": "SmsTemplates_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "SmsTemplates"
        ],
        "operationId": "SmsTemplates_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSmsTemplateDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSmsTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSmsTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "SmsTemplates"
        ],
        "operationId": "SmsTemplates_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/sms-templates/{id}/preview": {
      "post": {
        "tags": [
          "SmsTemplates"
        ],
        "summary": "Render a template with sample variables.",
        "operationId": "SmsTemplates_Preview",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/square/connections": {
      "get": {
        "tags": [
          "SquareConnection"
        ],
        "summary": "List connections visible to this tenant: its own linked connection plus\r\nunclaimed connections available for linking. Response item shape matches\r\nthe admin listing so the portal component is URL-swap compatible.",
        "operationId": "SquareConnection_GetConnections",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/square/connections/{merchantId}/locations": {
      "get": {
        "tags": [
          "SquareConnection"
        ],
        "summary": "Get locations for a merchant connection this tenant may see.",
        "operationId": "SquareConnection_GetLocations",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/square/connections/{merchantId}/link": {
      "post": {
        "tags": [
          "SquareConnection"
        ],
        "summary": "Link an unclaimed Square connection to this tenant.",
        "operationId": "SquareConnection_Link",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/square/connections/{merchantId}/unlink": {
      "post": {
        "tags": [
          "SquareConnection"
        ],
        "summary": "Unlink this tenant's Square connection.",
        "operationId": "SquareConnection_Unlink",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints": {
      "get": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/{slug}": {
      "get": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBlueprintRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBlueprintRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBlueprintRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TenantBlueprints"
        ],
        "summary": "Delete a never-published draft blueprint (#354). Published blueprints return 409.",
        "operationId": "TenantBlueprints_DeleteDraft",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/{slug}/publish": {
      "post": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_Publish",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishBlueprintRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishBlueprintRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublishBlueprintRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/{slug}/versions": {
      "get": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_Versions",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/generate": {
      "post": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_GenerateRecipe",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRecipeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRecipeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateRecipeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_ListGenerationRuns",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/generate/{runId}": {
      "get": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_GetGenerationRun",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/generate/{runId}/apply": {
      "post": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_ApplyGenerationRun",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyRecipeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyRecipeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyRecipeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/blueprints/{slug}/preview-compose": {
      "post": {
        "tags": [
          "TenantBlueprints"
        ],
        "operationId": "TenantBlueprints_PreviewCompose",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows": {
      "get": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "operationId": "TenantCapabilityFlows_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}": {
      "get": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "operationId": "TenantCapabilityFlows_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "operationId": "TenantCapabilityFlows_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCapabilityFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCapabilityFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCapabilityFlowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/publish": {
      "post": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "operationId": "TenantCapabilityFlows_Publish",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishCapabilityFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishCapabilityFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublishCapabilityFlowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/reset": {
      "post": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "#2433: forget the tenant's own copy of this skill so customers hear the\r\nstandard version again. Deletes every tenant-scoped row for the\r\ncapability, published history included, then recomposes. P2-A: the\r\nrows are copied to CapabilityFlowSnapshots first, so History can\r\nrestore them.",
        "operationId": "TenantCapabilityFlows_Reset",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/update-from-template": {
      "post": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "#2433: merge the template's changes since this fork's base version into\r\nthe tenant draft. Conflicts keep the merchant's value and are named.",
        "operationId": "TenantCapabilityFlows_UpdateFromTemplate",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/node-scope": {
      "get": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "#1046 Phase 2: the composed node universe of the tenant blueprint\r\nreferencing this capability. The server-side twin of the portal's\r\ncomposedNodeIds util, which reconstructs from summaries and misses\r\nnon-entry nodes in sibling capabilities.",
        "operationId": "TenantCapabilityFlows_NodeScope",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/versions": {
      "get": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "operationId": "TenantCapabilityFlows_Versions",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/versions/{from}/diff/{to}": {
      "get": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "P2-A: what changed between two of the tenant's versions of this skill,\r\nfield by field with the old and new values. `to` is a version\r\nnumber or `draft`.",
        "operationId": "TenantCapabilityFlows_DiffVersions",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/versions/{version}/restore": {
      "post": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "P2-A: copy a published version into the draft. Never publishes; the\r\nmerchant publishes the restored draft like any other edit.",
        "operationId": "TenantCapabilityFlows_RestoreVersion",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreCapabilityFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreCapabilityFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreCapabilityFlowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/snapshots": {
      "get": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "P2-A: the copies Reset set aside, newest first.",
        "operationId": "TenantCapabilityFlows_Snapshots",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/snapshots/{snapshotId}/restore": {
      "post": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "P2-A: restore a set-aside copy as a draft. Never publishes.",
        "operationId": "TenantCapabilityFlows_RestoreSnapshot",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreCapabilityFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreCapabilityFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreCapabilityFlowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/generate": {
      "post": {
        "tags": [
          "TenantCapabilityFlows"
        ],
        "summary": "#1046 Phase 2: constrained node-graph generation. Writes nothing to\r\nCapabilityFlows — a success returns the proposal for the editor to\r\nload as unsaved dirty state; a failed run returns 422 with the last\r\nattempt and its violations. Publish (with its hard gate) remains the\r\nonly door to going live.",
        "operationId": "TenantCapabilityFlows_Generate",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateFlowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-domains": {
      "get": {
        "tags": [
          "TenantDomains"
        ],
        "summary": "List all custom email domains for this tenant.",
        "operationId": "TenantDomains_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "TenantDomains"
        ],
        "summary": "Register a new custom email domain with Resend. Returns DNS records to configure.",
        "operationId": "TenantDomains_Add",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantDomainsController.AddDomainRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantDomainsController.AddDomainRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantDomainsController.AddDomainRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-domains/{id}": {
      "get": {
        "tags": [
          "TenantDomains"
        ],
        "summary": "Get a domain's details including DNS records the tenant needs to configure.",
        "operationId": "TenantDomains_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TenantDomains"
        ],
        "summary": "Remove a custom domain.",
        "operationId": "TenantDomains_Remove",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/email-domains/{id}/verify": {
      "post": {
        "tags": [
          "TenantDomains"
        ],
        "summary": "Trigger domain verification after DNS records have been configured.",
        "operationId": "TenantDomains_Verify",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/consents": {
      "get": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_ListConsents",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_AddConsent",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.AddConsentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.AddConsentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.AddConsentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/consents/{id}": {
      "get": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_GetConsent",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_RevokeConsent",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/consents/{id}/crawl": {
      "post": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "summary": "Queue a crawl and return immediately. This used to run the whole\r\npipeline inline, which meant the merchant stared at a disabled button\r\nfor minutes and lost every result if the six-minute HttpClient timeout\r\nfired. FaqCrawlWorkerService picks the run up; the portal polls\r\nGET runs/{id} for the progress bar.",
        "operationId": "TenantFaqCrawl_CrawlNow",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/runs": {
      "get": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_ListRuns",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "consentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/runs/{id}": {
      "get": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_GetRun",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/entries": {
      "get": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "summary": "The review queue. Paged and searchable because a crawl of a real help\r\ncentre returns hundreds of rows, and scoped by consent because a tenant\r\nwith two registered domains was previously shown the same tenant-wide\r\nlist under both.",
        "operationId": "TenantFaqCrawl_ListEntries",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "consentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "summary": "Add one FAQ by hand. It lands approved by default: the merchant wrote\r\nit, so there is nothing to review. No consent is attached, which is what\r\nmigration 406 made possible.",
        "operationId": "TenantFaqCrawl_CreateEntry",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.CreateEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.CreateEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.CreateEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/entries/import": {
      "post": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "summary": "Import a CSV or JSON export. Partial success is the normal outcome and\r\nis reported row by row: a file with one bad line should not cost the\r\nmerchant the other two hundred.",
        "operationId": "TenantFaqCrawl_ImportEntries",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/entries/{id}": {
      "patch": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_UpdateEntry",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.UpdateEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.UpdateEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.UpdateEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "operationId": "TenantFaqCrawl_DeleteEntry",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/faq-crawl/entries/bulk": {
      "post": {
        "tags": [
          "TenantFaqCrawl"
        ],
        "summary": "Approve, reject, reopen or delete a selection in one call. The review\r\nqueue is a bulk-select table, so doing this row by row would fire one\r\nrequest, one cache eviction and one corpus refresh per row.",
        "operationId": "TenantFaqCrawl_BulkUpdateEntries",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.BulkEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.BulkEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantFaqCrawlController.BulkEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/live-status": {
      "get": {
        "tags": [
          "TenantLiveStatus"
        ],
        "operationId": "TenantLiveStatus_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/phone-number": {
      "get": {
        "tags": [
          "TenantPhone"
        ],
        "summary": "Get the current phone number status for this tenant.\r\nReturns the assigned Twilio number with provisioning indicators.",
        "operationId": "TenantPhone_GetPhoneNumberStatus",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/phone-number/sms-stats": {
      "get": {
        "tags": [
          "TenantPhone"
        ],
        "summary": "Get SMS statistics for the tenant's phone number over the last N days.",
        "operationId": "TenantPhone_GetSmsStats",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/phone-number/messages": {
      "get": {
        "tags": [
          "TenantPhone"
        ],
        "summary": "Get paginated SMS message log for this tenant.",
        "operationId": "TenantPhone_GetMessages",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/phone-number/request": {
      "post": {
        "tags": [
          "TenantPhone"
        ],
        "summary": "Submit a phone number provisioning request for this tenant.\r\nIdempotent on the `Idempotency-Key` header: a replay of the same\r\nkey in this environment returns the original row and does not notify\r\nagain. Missing header is accepted; Edge mints a key the way the demo\r\nworkspace request path does. Unique index\r\n`ux_PhoneNumberRequests_IdempotencyKey_Env` is the race backstop.",
        "operationId": "TenantPhone_CreateRequest",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberRequestBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberRequestBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "TenantPhone"
        ],
        "summary": "Get the most recent pending or provisioning phone number request for this tenant.",
        "operationId": "TenantPhone_GetCurrentRequest",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/policy-rules/handoff": {
      "get": {
        "tags": [
          "TenantPolicyRules"
        ],
        "operationId": "TenantPolicyRules_GetHandoff",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "TenantPolicyRules"
        ],
        "operationId": "TenantPolicyRules_PutHandoff",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/policy-rules/verification": {
      "get": {
        "tags": [
          "TenantPolicyRules"
        ],
        "operationId": "TenantPolicyRules_GetVerification",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "TenantPolicyRules"
        ],
        "operationId": "TenantPolicyRules_PutVerification",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/policy-rules/tone": {
      "get": {
        "tags": [
          "TenantPolicyRules"
        ],
        "operationId": "TenantPolicyRules_GetTone",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "TenantPolicyRules"
        ],
        "operationId": "TenantPolicyRules_PutTone",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/slug/{tenantSlug}/profile": {
      "patch": {
        "tags": [
          "Tenants"
        ],
        "summary": "Updates the business-profile fields of your own tenant: display name,\r\ncontact email, assistant name, business hours, escalation policy,\r\nphone and forwarding numbers, callback behaviour, and the email idle\r\ntimeout. Requires the tenants.settings.manage permission.",
        "description": "PATCH semantics: a field you omit keeps its stored value.",
        "operationId": "Tenants_UpdateTenantProfile",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantProfileUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantProfileUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantProfileUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/slug/{tenantSlug}/tts-settings": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "operationId": "Tenants_UpdateTenantTtsSettings",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantTtsSettingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantTtsSettingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantTtsSettingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/slug/{tenantSlug}/languages": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Updates only the tenant's language list, so the conversation editor can\r\nregister a language the moment an author adds one to a node (#1030).\r\nExactly one entry must be primary. Newly added non-primary languages\r\ntrigger a translation backfill across the tenant's conversations;\r\nprogress is available from the translation-backfill-status endpoint.",
        "operationId": "Tenants_UpdateTenantLanguages",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TenantLanguageRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TenantLanguageRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TenantLanguageRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/escalation-target": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Whether this tenant's hard cases can reach a person (#1823, #1932).\r\n            \r\nRead by the go-live checklist so a merchant finds out from us rather\r\nthan from a customer who asked for a human and was told to go and find\r\none. The same service answers the blueprint publish gate and the\r\nlive-status card, so the explanation, the enforcement and the standing\r\ndashboard answer cannot drift apart. The payload carries the sentence\r\nand the page that fixes it; the portal renders, it does not decide.",
        "operationId": "Tenants_GetEscalationTarget",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/translation-backfill-status": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Returns the current backfill status for every language the tenant has\r\nrecently triggered a backfill for. Empty list when no backfill has run\r\nin the last 24 hours.",
        "operationId": "Tenants_GetTranslationBackfillStatus",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Retrieves a specific tenant by its business slug.",
        "operationId": "Tenants_GetTenant",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The unique business slug of the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/shortlink-domains": {
      "get": {
        "tags": [
          "TenantShortLinkDomains"
        ],
        "operationId": "TenantShortLinkDomains_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "TenantShortLinkDomains"
        ],
        "operationId": "TenantShortLinkDomains_Add",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantShortLinkDomainsController.AddDomainRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantShortLinkDomainsController.AddDomainRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantShortLinkDomainsController.AddDomainRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/shortlink-domains/{id}": {
      "get": {
        "tags": [
          "TenantShortLinkDomains"
        ],
        "operationId": "TenantShortLinkDomains_Get",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TenantShortLinkDomains"
        ],
        "operationId": "TenantShortLinkDomains_Remove",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/shortlink-domains/{id}/verify": {
      "post": {
        "tags": [
          "TenantShortLinkDomains"
        ],
        "operationId": "TenantShortLinkDomains_Verify",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/checks": {
      "get": {
        "tags": [
          "TenantSkillChecks"
        ],
        "operationId": "TenantSkillChecks_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "blueprintSlug",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "TenantSkillChecks"
        ],
        "operationId": "TenantSkillChecks_Create",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSkillCheckRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSkillCheckRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSkillCheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/checks/{checkId}": {
      "put": {
        "tags": [
          "TenantSkillChecks"
        ],
        "operationId": "TenantSkillChecks_Update",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSkillCheckRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSkillCheckRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSkillCheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TenantSkillChecks"
        ],
        "operationId": "TenantSkillChecks_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/checks/{checkId}/active": {
      "put": {
        "tags": [
          "TenantSkillChecks"
        ],
        "operationId": "TenantSkillChecks_SetActive",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSkillCheckActiveRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSkillCheckActiveRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetSkillCheckActiveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/checks/runs": {
      "post": {
        "tags": [
          "TenantSkillChecks"
        ],
        "summary": "Queues a run of every active check against the saved draft.\r\n            202 with the run; an unfinished run is returned instead of a second one.",
        "operationId": "TenantSkillChecks_StartRun",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSkillCheckRunRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSkillCheckRunRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartSkillCheckRunRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/capability-flows/{capabilityName}/checks/runs/{runId}": {
      "get": {
        "tags": [
          "TenantSkillChecks"
        ],
        "operationId": "TenantSkillChecks_GetRun",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "capabilityName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/welcome-audio": {
      "get": {
        "tags": [
          "TenantWelcomeAudio"
        ],
        "operationId": "TenantWelcomeAudio_List",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "TenantWelcomeAudio"
        ],
        "operationId": "TenantWelcomeAudio_Upload",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "TenantWelcomeAudio"
        ],
        "operationId": "TenantWelcomeAudio_Delete",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/toast/connections": {
      "get": {
        "tags": [
          "ToastConnection"
        ],
        "summary": "Get the current Toast connection for a tenant.",
        "operationId": "ToastConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ToastConnection"
        ],
        "summary": "Connect Toast to a tenant. Validates credentials and stores encrypted.",
        "operationId": "ToastConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectToastRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectToastRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectToastRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ToastConnection"
        ],
        "summary": "Disconnect Toast from a tenant.",
        "operationId": "ToastConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/toast/connections/test": {
      "post": {
        "tags": [
          "ToastConnection"
        ],
        "summary": "Test the Toast connection by calling the Restaurants API.",
        "operationId": "ToastConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/treez/connections": {
      "get": {
        "tags": [
          "TreezConnection"
        ],
        "summary": "Get the current Treez connection for a tenant.",
        "operationId": "TreezConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "TreezConnection"
        ],
        "summary": "Connect Treez to a tenant. Validates the signing material against\r\njwt-validation and stores the private key encrypted.",
        "operationId": "TreezConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectTreezRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectTreezRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectTreezRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TreezConnection"
        ],
        "summary": "Disconnect Treez from a tenant.",
        "operationId": "TreezConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/treez/connections/test": {
      "post": {
        "tags": [
          "TreezConnection"
        ],
        "summary": "Test the Treez connection by signing a JWT and calling jwt-validation.",
        "operationId": "TreezConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/treez/connections/webhook-url": {
      "get": {
        "tags": [
          "TreezConnection"
        ],
        "summary": "The callback URL the dispensary pastes into the Treez portal's webhook\r\nintegration screen (Configurations > Config Page > Integration). Null when\r\nPos:Treez:WebhookCallbackBaseUrl is unset or the tenant has no connection —\r\nthe token itself never rides TreezConnectionInfo.",
        "operationId": "TreezConnection_GetWebhookUrl",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tts/{tenantSlug}/synthesize": {
      "post": {
        "tags": [
          "Tts"
        ],
        "summary": "Synthesizes speech for the given text using the tenant's configured TTS voice and settings.\r\nLanguage overrides are applied when available.",
        "operationId": "Tts_Synthesize",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "description": "The tenant's business slug (e.g. \"demo-restaurant\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Text and language to synthesize.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tts/{tenantSlug}/default-voice": {
      "get": {
        "tags": [
          "Tts"
        ],
        "summary": "Returns the resolved default TTS voice configuration for a tenant.\r\nUsed by the portal VoicePicker to show the inherited sector voice when no workspace voice is set.",
        "operationId": "Tts_GetDefaultVoice",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tts/voices": {
      "get": {
        "tags": [
          "TtsVoices"
        ],
        "operationId": "TtsVoices_GetVoices",
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tts/voices/{voiceId}/preview": {
      "get": {
        "tags": [
          "TtsVoices"
        ],
        "operationId": "TtsVoices_GetPreview",
        "parameters": [
          {
            "name": "voiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zammad/connections": {
      "get": {
        "tags": [
          "ZammadConnection"
        ],
        "operationId": "ZammadConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ZammadConnection"
        ],
        "operationId": "ZammadConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZammadConnectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ZammadConnectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ZammadConnectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ZammadConnection"
        ],
        "operationId": "ZammadConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zammad/connections/test": {
      "post": {
        "tags": [
          "ZammadConnection"
        ],
        "operationId": "ZammadConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zendesk/connections": {
      "get": {
        "tags": [
          "ZendeskConnection"
        ],
        "summary": "Get the current Zendesk connection for a tenant.",
        "operationId": "ZendeskConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ZendeskConnection"
        ],
        "summary": "Connect Zendesk to a tenant. Encrypts and stores credentials, then\r\nregisters the event-subscription webhook.",
        "operationId": "ZendeskConnection_Connect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectZendeskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectZendeskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectZendeskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ZendeskConnection"
        ],
        "summary": "Disconnect Zendesk from a tenant. Tears down the registered webhook\r\nfirst (best-effort, while credentials are still readable).",
        "operationId": "ZendeskConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zendesk/connections/settings": {
      "put": {
        "tags": [
          "ZendeskConnection"
        ],
        "summary": "Update the per-tenant Zendesk escalation settings (#1448): fact-key →\r\ncustom-field mappings, default ticket priority, and default tags.",
        "operationId": "ZendeskConnection_UpdateSettings",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateZendeskSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateZendeskSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateZendeskSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zendesk/ticket-fields": {
      "get": {
        "tags": [
          "ZendeskConnection"
        ],
        "summary": "List the tenant's Zendesk custom ticket fields (removable + active),\r\nso the portal can offer fact-key → field mappings without the merchant\r\nhand-copying field ids out of the Zendesk admin UI.",
        "operationId": "ZendeskConnection_ListTicketFields",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zendesk/connections/test": {
      "post": {
        "tags": [
          "ZendeskConnection"
        ],
        "summary": "Test the Zendesk connection by calling the authenticated-user endpoint.",
        "operationId": "ZendeskConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zoho-desk/connections": {
      "get": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "summary": "The tenant's connection, or { configured: false }. \"available\" says\r\nwhether this environment can connect Zoho Desk at all.",
        "operationId": "ZohoDeskConnection_GetConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "operationId": "ZohoDeskConnection_Disconnect",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zoho-desk/connections/organizations": {
      "get": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "operationId": "ZohoDeskConnection_ListOrganizations",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zoho-desk/connections/organization": {
      "post": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "operationId": "ZohoDeskConnection_SelectOrganization",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectZohoDeskOrganizationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectZohoDeskOrganizationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SelectZohoDeskOrganizationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zoho-desk/connections/departments": {
      "get": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "operationId": "ZohoDeskConnection_ListDepartments",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zoho-desk/connections/settings": {
      "put": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "operationId": "ZohoDeskConnection_UpdateSettings",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZohoDeskSettingsUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ZohoDeskSettingsUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ZohoDeskSettingsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tenants/{tenantSlug}/zoho-desk/connections/test": {
      "post": {
        "tags": [
          "ZohoDeskConnection"
        ],
        "operationId": "ZohoDeskConnection_TestConnection",
        "parameters": [
          {
            "name": "tenantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddAddonRequest": {
        "type": "object",
        "properties": {
          "addonSlug": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddNoteRequest": {
        "type": "object",
        "properties": {
          "noteBody": {
            "type": "string",
            "nullable": true
          },
          "authorName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AppliedPromotionDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "campaignName": {
            "type": "string",
            "nullable": true
          },
          "percentOff": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "amountOffCents": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "duration": {
            "type": "string",
            "nullable": true
          },
          "durationInMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "redeemedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ApplyRecipeRequest": {
        "type": "object",
        "properties": {
          "recipe": {
            "$ref": "#/components/schemas/RecipeModelOutput"
          },
          "publish": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BillingOutcomeBreakdownDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "nullable": true
          },
          "conversations": {
            "type": "integer",
            "format": "int32"
          },
          "credits": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "BillingSummaryDto": {
        "type": "object",
        "properties": {
          "planSlug": {
            "type": "string",
            "nullable": true
          },
          "planName": {
            "type": "string",
            "nullable": true
          },
          "billingMode": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "billingInterval": {
            "type": "string",
            "nullable": true
          },
          "allotment": {
            "type": "number",
            "format": "double"
          },
          "consumedCredits": {
            "type": "number",
            "format": "double"
          },
          "remainingCredits": {
            "type": "number",
            "format": "double"
          },
          "overageCredits": {
            "type": "number",
            "format": "double"
          },
          "periodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trialEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "hasStripeCustomer": {
            "type": "boolean"
          },
          "outcomeBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingOutcomeBreakdownDto"
            },
            "nullable": true
          },
          "appliedPromotion": {
            "$ref": "#/components/schemas/AppliedPromotionDto"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelEntitlementDto"
            },
            "nullable": true
          },
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionAddonDto"
            },
            "nullable": true
          },
          "shopifyPlanSelectionUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BlueprintCapabilityRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "flowVersion": {
            "type": "integer",
            "format": "int32"
          },
          "enabled": {
            "type": "boolean"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CancelSubscriptionRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for subscription cancellation"
      },
      "CapabilityOverrideRequest": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "nullable": true
          },
          "entryPrompt": {
            "type": "string",
            "nullable": true
          },
          "exitPrompt": {
            "type": "string",
            "nullable": true
          },
          "resumePrompt": {
            "type": "string",
            "nullable": true
          },
          "config": {
            "type": "string",
            "nullable": true
          },
          "whenOff": {
            "type": "string",
            "description": "What a customer hears when the skill is off: `handoff` (offer the\r\nteam, the default) or `decline` (#3293).",
            "nullable": true
          },
          "republish": {
            "type": "boolean",
            "description": "Republish the skill sets that carry this skill even when the switch does\r\nnot change, so a skill whose setting and live state disagree can be put\r\nright from the Skills page (#3293).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Patch payload for a tenant capability override. Every field is nullable; a null means\r\n\"leave this field as it is\" (#3293). DELETE resets the whole override to the\r\ndefinition defaults. Config is a JSON string; it is shallow-merged into the\r\ndefinition's config on read."
      },
      "ChangePlanRequest": {
        "type": "object",
        "properties": {
          "planSlug": {
            "type": "string",
            "nullable": true
          },
          "interval": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ChannelAddonDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "monthlyPriceCents": {
            "type": "integer",
            "format": "int32"
          },
          "grantedChannels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "purchasable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ChannelEntitlementDto": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "nullable": true
          },
          "entitled": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "addonSlug": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CheckoutUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClaimShopifyInstallRequest": {
        "type": "object",
        "properties": {
          "claimToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for claiming a parked Shopify install: the token the OAuth\r\ncallback put on the portal URL."
      },
      "ClarificationSettingsRequest": {
        "type": "object",
        "properties": {
          "alwaysAskModifiers": {
            "type": "boolean",
            "nullable": true
          },
          "alwaysClarifyAmbiguous": {
            "type": "boolean",
            "nullable": true
          },
          "promptTone": {
            "type": "string",
            "nullable": true
          },
          "enableUpsellPrompts": {
            "type": "boolean",
            "nullable": true
          },
          "maxVariationsToShow": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "maxModifiersToShow": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update clarification settings for a tenant.\r\nAll fields are optional - only provided fields will be updated."
      },
      "ConcludeExperimentRequest": {
        "type": "object",
        "properties": {
          "winningVariantId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "promoteWinner": {
            "type": "boolean",
            "nullable": true
          },
          "allowRollback": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectBlazeRequest": {
        "type": "object",
        "properties": {
          "partnerKey": {
            "type": "string",
            "nullable": true
          },
          "developerKey": {
            "type": "string",
            "nullable": true
          },
          "apiBaseUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectBookingRequest": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "apiKey": {
            "type": "string",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "clientSecret": {
            "type": "string",
            "nullable": true
          },
          "refreshToken": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          },
          "baseUrl": {
            "type": "string",
            "nullable": true
          },
          "externalShopId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting a booking provider. Only the fields relevant to the provider's\r\nauth model are required (apiKey for Shopmonkey; clientId/clientSecret/externalShopId for Tekmetric;\r\nclientId = staff username, clientSecret = staff password, externalShopId = Site ID for Mindbody)."
      },
      "ConnectGladlyRequest": {
        "type": "object",
        "properties": {
          "organizationName": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          },
          "defaultInboxId": {
            "type": "string",
            "nullable": true
          },
          "registerWebhook": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting Gladly."
      },
      "ConnectGorgiasRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          },
          "defaultTeamId": {
            "type": "string",
            "nullable": true
          },
          "registerWebhook": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting Gorgias."
      },
      "ConnectKustomerRequest": {
        "type": "object",
        "properties": {
          "orgName": {
            "type": "string",
            "nullable": true
          },
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          },
          "defaultQueueId": {
            "type": "string",
            "nullable": true
          },
          "registerWebhook": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting Kustomer."
      },
      "ConnectMeadowRequest": {
        "type": "object",
        "properties": {
          "consumerKey": {
            "type": "string",
            "nullable": true
          },
          "clientKey": {
            "type": "string",
            "nullable": true
          },
          "apiBaseUrl": {
            "type": "string",
            "nullable": true
          },
          "menuApiBaseUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectPosabitRequest": {
        "type": "object",
        "properties": {
          "integratorToken": {
            "type": "string",
            "nullable": true
          },
          "venueToken": {
            "type": "string",
            "nullable": true
          },
          "menuFeedKey": {
            "type": "string",
            "nullable": true
          },
          "menuFeedToken": {
            "type": "string",
            "nullable": true
          },
          "apiBaseUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectRechargeRequest": {
        "type": "object",
        "properties": {
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "storeDomain": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting Recharge."
      },
      "ConnectRedoRequest": {
        "type": "object",
        "properties": {
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "storeId": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          },
          "teamId": {
            "type": "string",
            "nullable": true
          },
          "registerWebhook": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting Redo"
      },
      "ConnectShopifyRequest": {
        "type": "object",
        "properties": {
          "shopDomain": {
            "type": "string",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "clientSecret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting a Shopify store via OAuth 2.0 client credentials"
      },
      "ConnectToastRequest": {
        "type": "object",
        "properties": {
          "restaurantExternalId": {
            "type": "string",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "clientSecret": {
            "type": "string",
            "nullable": true
          },
          "managementGroupId": {
            "type": "string",
            "nullable": true
          },
          "apiBaseUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectTreezRequest": {
        "type": "object",
        "properties": {
          "privateKeyPem": {
            "type": "string",
            "nullable": true
          },
          "certificateId": {
            "type": "string",
            "nullable": true
          },
          "organizationId": {
            "type": "string",
            "nullable": true
          },
          "dispensaryName": {
            "type": "string",
            "nullable": true
          },
          "apiBaseUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectZendeskRequest": {
        "type": "object",
        "properties": {
          "subdomain": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "defaultGroupId": {
            "type": "string",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "clientSecret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for connecting Zendesk. Exactly one credential pair:\r\nEmail + ApiToken (legacy Basic, ends 2027-04-30) or ClientId +\r\nClientSecret (OAuth client credentials). New members are appended after\r\nDefaultGroupId on purpose: inserting them earlier would silently rebind\r\nexisting positional constructions."
      },
      "ConversationSettingsRequest": {
        "type": "object",
        "properties": {
          "deadAirThresholdMs": {
            "type": "integer",
            "description": "Dead air threshold in milliseconds",
            "format": "int32",
            "nullable": true
          },
          "ttsFirstChunkThresholdMs": {
            "type": "integer",
            "description": "TTS first chunk threshold in milliseconds",
            "format": "int32",
            "nullable": true
          },
          "welcomeStartThresholdMs": {
            "type": "integer",
            "description": "Welcome start threshold in milliseconds",
            "format": "int32",
            "nullable": true
          },
          "treatWelcomeAsBotSay": {
            "type": "boolean",
            "description": "Whether to treat welcome as first bot turn",
            "nullable": true
          },
          "enableLatencyEvents": {
            "type": "boolean",
            "description": "Whether to enable latency violation events",
            "nullable": true
          },
          "globalDtmfOverrides": {
            "description": "Global DTMF overrides mapping (flexible JSON)\r\nExample: { \"0\": { \"action\": \"transfer_call\" } }",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update tenant conversation settings"
      },
      "ConversationTtsSettingsRequest": {
        "type": "object",
        "properties": {
          "conversationVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ttsProvider": {
            "type": "string",
            "nullable": true
          },
          "ttsVoiceId": {
            "type": "string",
            "nullable": true
          },
          "ttsModel": {
            "type": "string",
            "nullable": true
          },
          "speechRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "pitch": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "stability": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "similarityBoost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ttsLanguage": {
            "type": "string",
            "nullable": true
          },
          "languageOverrides": {
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request DTO for creating or updating conversation-level TTS settings.\r\nAll fields are optional — only non-null values are applied."
      },
      "CreateApiKeyRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateConversationDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "supportedLanguages": {
            "type": "string",
            "nullable": true
          },
          "definition": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateEmailTemplateDto": {
        "type": "object",
        "properties": {
          "templateKey": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "htmlBody": {
            "type": "string",
            "nullable": true
          },
          "textBody": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "variables": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateExperimentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "trafficAllocation": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "routingStrategy": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateOrderWithPaymentRequest": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "nullable": true
          },
          "customerPhone": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string",
            "nullable": true
          },
          "customerEmail": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemRequest"
            },
            "nullable": true
          },
          "referenceId": {
            "type": "string",
            "nullable": true
          },
          "fulfillmentType": {
            "type": "string",
            "nullable": true
          },
          "scheduledPickupTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatePosOrderRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "description": "Optional override for the POS location. Defaults to tenant settings when omitted.",
            "nullable": true
          },
          "items": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineItem"
            }
          },
          "customerPhone": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "API request payload for creating a POS order via Merrows Edge."
      },
      "CreateReportRequest": {
        "type": "object",
        "properties": {
          "reportType": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateSmsTemplateDto": {
        "type": "object",
        "properties": {
          "templateKey": {
            "type": "string",
            "nullable": true
          },
          "templateText": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateVariantRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "conversationSlug": {
            "type": "string",
            "nullable": true
          },
          "conversationVersion": {
            "type": "integer",
            "format": "int32"
          },
          "trafficWeight": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ttsSettingsJson": {
            "type": "string",
            "nullable": true
          },
          "isControl": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EmailConversationsController.ReplyRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EmailSettingsController.StartVerificationRequest": {
        "type": "object",
        "properties": {
          "externalEmailAddress": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EmailSettingsController.UpdateEmailSettingsRequest": {
        "type": "object",
        "properties": {
          "inboundEmailEnabled": {
            "type": "boolean",
            "nullable": true
          },
          "replyFromEmailAddress": {
            "type": "string",
            "description": "Outbound reply-from override (#1361). Null = leave unchanged; empty\r\nstring = clear back to the default chain (inbound address, then the\r\nplatform default). The inbound routing address is deliberately not\r\naccepted on this endpoint; a stale client sending it is ignored.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EmailTemplatesController.SendTestEmailRequest": {
        "type": "object",
        "properties": {
          "toEmail": {
            "type": "string",
            "nullable": true
          },
          "variables": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EmbedConnectionStatusResponse": {
        "type": "object",
        "properties": {
          "keyPrefix": {
            "type": "string",
            "nullable": true
          },
          "isEnabled": {
            "type": "boolean"
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "conversationSlug": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "themeColor": {
            "type": "string",
            "nullable": true
          },
          "launcherPosition": {
            "type": "string",
            "nullable": true
          },
          "greeting": {
            "type": "string",
            "nullable": true
          },
          "configured": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EmbedConnectionUpdateRequest": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "conversationSlug": {
            "type": "string",
            "nullable": true
          },
          "themeColor": {
            "type": "string",
            "nullable": true
          },
          "launcherPosition": {
            "type": "string",
            "nullable": true
          },
          "greeting": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EmbedKeyCreatedResponse": {
        "type": "object",
        "properties": {
          "embedKey": {
            "type": "string",
            "nullable": true
          },
          "keyPrefix": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateFlowRequest": {
        "type": "object",
        "properties": {
          "instruction": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateRecipeRequest": {
        "type": "object",
        "properties": {
          "sector": {
            "type": "string",
            "nullable": true
          },
          "businessDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "HelpdeskAttachment": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "mimeType": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "HelpdeskEscalationRequest": {
        "type": "object",
        "properties": {
          "customerEmail": {
            "type": "string",
            "nullable": true
          },
          "customerPhone": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "conversationTranscript": {
            "type": "string",
            "nullable": true
          },
          "escalationReason": {
            "type": "string",
            "nullable": true
          },
          "channel": {
            "type": "string",
            "nullable": true
          },
          "inboxId": {
            "type": "string",
            "nullable": true
          },
          "orderId": {
            "type": "string",
            "nullable": true
          },
          "ringleCallId": {
            "type": "string",
            "nullable": true
          },
          "ringleSessionId": {
            "type": "string",
            "nullable": true
          },
          "customAttributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HelpdeskAttachment"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IntentOverrideRequest": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Whether this intent is enabled for the tenant. Null leaves the current value unchanged.",
            "nullable": true
          },
          "customDescription": {
            "type": "string",
            "description": "Optional override for the intent description (used in LLM prompts).",
            "nullable": true
          },
          "customExamples": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional override for the intent examples (used in LLM prompts).",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "Category for a net-new tenant intent. Null for overrides of catalog intents.",
            "nullable": true
          },
          "isInterruption": {
            "type": "boolean",
            "description": "Whether a net-new tenant intent interrupts the current flow.",
            "nullable": true
          },
          "targetCapability": {
            "type": "string",
            "description": "Capability a net-new tenant intent routes to.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request payload for creating or updating a tenant intent override."
      },
      "LlmPromptOverrideRequest": {
        "type": "object",
        "properties": {
          "promptTemplate": {
            "type": "string",
            "nullable": true
          },
          "systemMessage": {
            "type": "string",
            "nullable": true
          },
          "temperature": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Patch payload for a tenant LLM prompt override. Every field is nullable; a null means\r\n\"no override for this field — fall back to tenant-type / system default\"."
      },
      "ModifierRequest": {
        "type": "object",
        "properties": {
          "catalogModifierId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Money": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OmsCancelRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "nullable": true
          },
          "refund": {
            "type": "boolean"
          },
          "restock": {
            "type": "boolean"
          },
          "notifyCustomer": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OmsExchangeLineItem": {
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "OmsExchangeRequest": {
        "type": "object",
        "properties": {
          "returnLineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OmsReturnLineItem"
            },
            "nullable": true
          },
          "exchangeLineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OmsExchangeLineItem"
            },
            "nullable": true
          },
          "notifyCustomer": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OmsProcessReturnRequest": {
        "type": "object",
        "properties": {
          "refund": {
            "type": "boolean"
          },
          "notifyCustomer": {
            "type": "boolean"
          },
          "refundMethod": {
            "type": "string",
            "nullable": true
          },
          "restock": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OmsReturnLineItem": {
        "type": "object",
        "properties": {
          "fulfillmentLineItemId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "returnReason": {
            "type": "string",
            "nullable": true
          },
          "customerNote": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OmsReturnRequest": {
        "type": "object",
        "properties": {
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OmsReturnLineItem"
            },
            "nullable": true
          },
          "notifyCustomer": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OrderItemRequest": {
        "type": "object",
        "properties": {
          "catalogItemId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "modifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModifierRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderLineItem": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "unitPrice": {
            "$ref": "#/components/schemas/Money"
          },
          "totalPrice": {
            "$ref": "#/components/schemas/Money"
          },
          "modifiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "menuItemId": {
            "type": "string",
            "nullable": true
          },
          "variantId": {
            "type": "string",
            "nullable": true
          },
          "modifierIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OutboundCallRequest": {
        "type": "object",
        "properties": {
          "destinationNumber": {
            "type": "string",
            "nullable": true
          },
          "conversationSlug": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "flowParameters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OutboundCallResponse": {
        "type": "object",
        "properties": {
          "callId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "initiatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "OutboundCallStatusResponse": {
        "type": "object",
        "properties": {
          "callId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "initiatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "answeredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "durationSeconds": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PhoneNumberRequestBody": {
        "type": "object",
        "properties": {
          "preferredAreaCode": {
            "type": "string",
            "nullable": true
          },
          "businessJustification": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for phone number provisioning request"
      },
      "PlanOptionDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "monthlyPriceCents": {
            "type": "integer",
            "format": "int32"
          },
          "annualPriceCents": {
            "type": "integer",
            "format": "int32"
          },
          "monthlyCreditAllotment": {
            "type": "integer",
            "format": "int32"
          },
          "overageRateCents": {
            "type": "integer",
            "format": "int32"
          },
          "isEnterprise": {
            "type": "boolean"
          },
          "purchasable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PlansCatalogueDto": {
        "type": "object",
        "properties": {
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanOptionDto"
            },
            "nullable": true
          },
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelAddonDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "PublishBlueprintRequest": {
        "type": "object",
        "properties": {
          "changeNotes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublishCapabilityFlowRequest": {
        "type": "object",
        "properties": {
          "changeNotes": {
            "type": "string",
            "nullable": true
          },
          "acknowledgeTemplateVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublishConversationRequest": {
        "type": "object",
        "properties": {
          "changeNotes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for publishing a conversation."
      },
      "QuickPaymentRequest": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "nullable": true
          },
          "itemName": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "customerPhone": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string",
            "nullable": true
          },
          "customerEmail": {
            "type": "string",
            "nullable": true
          },
          "paymentNote": {
            "type": "string",
            "nullable": true
          },
          "allowTipping": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RecipeCapabilityChoice": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RecipeModelOutput": {
        "type": "object",
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecipeCapabilityChoice"
            },
            "nullable": true
          },
          "routingPrompts": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "maxClarifications": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReloadPackDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "credits": {
            "type": "integer",
            "format": "int32"
          },
          "priceCents": {
            "type": "integer",
            "format": "int32"
          },
          "purchasable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RestoreCapabilityFlowRequest": {
        "type": "object",
        "properties": {
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "force": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ReturnStatusUpdateRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RollbackConversationRequest": {
        "type": "object",
        "properties": {
          "changeNotes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for rolling back a conversation."
      },
      "SaveSkillCheckRequest": {
        "type": "object",
        "properties": {
          "blueprintSlug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scenarioId": {
            "type": "string",
            "nullable": true
          },
          "startAtSkill": {
            "type": "boolean"
          },
          "channel": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "script": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "expectations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillCheckExpectationDto"
            },
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SelectZohoDeskOrganizationRequest": {
        "type": "object",
        "properties": {
          "orgId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetSkillCheckActiveRequest": {
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SkillCheckExpectationDto": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "stepId": {
            "type": "string",
            "nullable": true
          },
          "actionType": {
            "type": "string",
            "nullable": true
          },
          "ruleKey": {
            "type": "string",
            "nullable": true
          },
          "phrase": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmsSettingsController.UpdateSmsSettingsRequest": {
        "type": "object",
        "properties": {
          "inboundSmsEnabled": {
            "type": "boolean",
            "description": "Null = leave unchanged.",
            "nullable": true
          },
          "inboundSmsConversationSlug": {
            "type": "string",
            "description": "Null = leave unchanged; empty string = clear. Must name an active\r\nconversation of this tenant when set.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StartCheckoutRequest": {
        "type": "object",
        "properties": {
          "planSlug": {
            "type": "string",
            "nullable": true
          },
          "interval": {
            "type": "string",
            "nullable": true
          },
          "promotionCode": {
            "type": "string",
            "nullable": true
          },
          "addons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StartReloadRequest": {
        "type": "object",
        "properties": {
          "packSlug": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StartSkillCheckRunRequest": {
        "type": "object",
        "properties": {
          "blueprintSlug": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SubscriptionAddonDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SwapSubscriptionVariantRequest": {
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "nullable": true
          },
          "productId": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for swapping a subscription's product variant (#1507)."
      },
      "SynthesizeRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "minLength": 1,
            "type": "string",
            "description": "Text to synthesize into speech."
          },
          "language": {
            "type": "string",
            "description": "BCP-47 language code (e.g. \"en-US\", \"es-ES\"). Used to resolve per-locale voice overrides.",
            "nullable": true
          },
          "voiceId": {
            "type": "string",
            "description": "Optional voice ID override. When set, bypasses the tenant's configured voice.\r\nUsed by demo workspaces to honor the user's VoicePicker selection.",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "description": "Optional TTS provider override (\"ElevenLabs\", \"Cartesia\", \"Azure\").\r\nWhen set, bypasses the tenant's configured provider.",
            "nullable": true
          },
          "conversationSlug": {
            "type": "string",
            "description": "Optional conversation slug. When set, conversation-level TTS settings are\r\nresolved and layered on top of the tenant base config.",
            "nullable": true
          },
          "conversationVersion": {
            "type": "integer",
            "description": "Optional conversation version. Used together with ConversationSlug to pin\r\nTTS settings to a specific conversation version.",
            "format": "int32",
            "nullable": true
          },
          "demoWorkspaceId": {
            "type": "string",
            "description": "Optional demo workspace id. When the caller is a workspace member (or an\r\nanonymous-session user who bootstrapped the workspace) but not a member of\r\nthe sector tenant, this authorizes synthesis the same way\r\nTextConversationHub authorizes workspace-scoped conversations.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request payload for tenant-aware TTS synthesis."
      },
      "TenantDomainsController.AddDomainRequest": {
        "type": "object",
        "properties": {
          "domainName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantFaqCrawlController.AddConsentRequest": {
        "type": "object",
        "properties": {
          "domainName": {
            "type": "string",
            "nullable": true
          },
          "robotsOverride": {
            "type": "boolean"
          },
          "allowBrowserLane": {
            "type": "boolean"
          },
          "refreshIntervalHours": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantFaqCrawlController.BulkEntryRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "action": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantFaqCrawlController.CreateEntryRequest": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "nullable": true
          },
          "answer": {
            "type": "string",
            "nullable": true
          },
          "sourceUrl": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantFaqCrawlController.UpdateEntryRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "answer": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantLanguageRequest": {
        "required": [
          "languageCode"
        ],
        "type": "object",
        "properties": {
          "languageCode": {
            "minLength": 1,
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "menuOption": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantProfileUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "type": "string",
            "description": "Business display name.",
            "nullable": true
          },
          "email": {
            "maxLength": 200,
            "type": "string",
            "description": "Business contact email.",
            "nullable": true
          },
          "escalationEmail": {
            "maxLength": 200,
            "type": "string",
            "description": "Where handoffs are emailed, when that is not the contact email\r\ncustomers are told (#3200). Empty clears it.",
            "nullable": true
          },
          "botName": {
            "maxLength": 100,
            "type": "string",
            "description": "What the AI employee calls itself.",
            "nullable": true
          },
          "assistantNameDecided": {
            "type": "boolean",
            "description": "Send true when the business declines to name its AI employee and\r\nwants it to speak as the business. Records that the question was\r\nanswered without changing the name.",
            "nullable": true
          },
          "website": {
            "maxLength": 500,
            "type": "string",
            "description": "Business website URL. Blank clears it.",
            "nullable": true
          },
          "businessProfile": {
            "maxLength": 2000,
            "type": "string",
            "description": "A few sentences about the business: what it is, who it serves, what\r\nthe AI employee can and cannot do for customers. The AI uses it to\r\nanswer general questions. Blank clears it.",
            "nullable": true
          },
          "businessHours": {
            "type": "string",
            "description": "Prose business hours (rendered from the structured form).",
            "nullable": true
          },
          "businessHoursStructured": {
            "type": "string",
            "description": "Structured business hours JSON.",
            "nullable": true
          },
          "escalationPolicy": {
            "type": "string",
            "description": "What the bot should do when a caller asks for a human.",
            "nullable": true
          },
          "phoneNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Inbound phone number for this tenant.",
            "nullable": true
          },
          "forwardingNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Number used when forwarding a call to a human.",
            "nullable": true
          },
          "callbackCooldownSeconds": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "Seconds to wait before a repeat callback to the same caller.",
            "format": "int32",
            "nullable": true
          },
          "callbackMaxRetries": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "How many times a callback is retried.",
            "format": "int32",
            "nullable": true
          },
          "enableOutboundReturnCallOnDisconnect": {
            "type": "boolean",
            "description": "Call the caller back when a call drops mid-return.",
            "nullable": true
          },
          "emailIdleTimeoutMinutes": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "Minutes of silence before an email thread is considered idle. 0 clears to inherit.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The business-profile fields you may change on your own tenant.\r\nEvery property is optional and follows PATCH semantics: a property you omit\r\nkeeps its stored value. An empty string clears a clearable field."
      },
      "TenantShortLinkDomainsController.AddDomainRequest": {
        "type": "object",
        "properties": {
          "domainName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantTtsLocaleConfigRequest": {
        "required": [
          "language"
        ],
        "type": "object",
        "properties": {
          "language": {
            "minLength": 1,
            "type": "string"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "voiceId": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "speechRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "pitch": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "stability": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "similarityBoost": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantTtsSettingRequest": {
        "required": [
          "ttsProvider",
          "ttsVoiceId"
        ],
        "type": "object",
        "properties": {
          "ttsProvider": {
            "minLength": 1,
            "type": "string"
          },
          "ttsVoiceId": {
            "minLength": 1,
            "type": "string"
          },
          "ttsModel": {
            "type": "string",
            "nullable": true
          },
          "ttsLanguage": {
            "type": "string",
            "description": "#1245: null means \"leave the stored value alone\".",
            "nullable": true
          },
          "speechRate": {
            "type": "number",
            "format": "double"
          },
          "pitch": {
            "type": "number",
            "format": "double"
          },
          "stability": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "similarityBoost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "languageOverrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantTtsLocaleConfigRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateBlueprintRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlueprintCapabilityRef"
            },
            "nullable": true
          },
          "channelConfig": {
            "type": "string",
            "nullable": true
          },
          "routingConfig": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateCapabilityFlowRequest": {
        "type": "object",
        "properties": {
          "definitionJson": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "entryNodeId": {
            "type": "string",
            "nullable": true
          },
          "supportedLanguages": {
            "type": "string",
            "nullable": true
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "force": {
            "type": "boolean"
          },
          "hasUpdatableField": {
            "type": "boolean",
            "readOnly": true
          },
          "changesDefinition": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "UpdateConversationDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "supportedLanguages": {
            "type": "string",
            "nullable": true
          },
          "definition": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateEmailTemplateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "htmlBody": {
            "type": "string",
            "nullable": true
          },
          "textBody": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "variables": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateExperimentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "trafficAllocation": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "routingStrategy": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateRechargeSettingsRequest": {
        "type": "object",
        "properties": {
          "storeDomain": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating Recharge connection settings. StoreDomain is\r\ndisplay/support metadata; blank clears it."
      },
      "UpdateSmsTemplateDto": {
        "type": "object",
        "properties": {
          "templateText": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateVariantRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "conversationSlug": {
            "type": "string",
            "nullable": true
          },
          "conversationVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "trafficWeight": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ttsSettingsJson": {
            "type": "string",
            "nullable": true
          },
          "isControl": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateZendeskSettingsRequest": {
        "type": "object",
        "properties": {
          "customFieldMappings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ZendeskFieldMappingDto"
            },
            "nullable": true
          },
          "defaultPriority": {
            "type": "string",
            "nullable": true
          },
          "defaultTags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "defaultGroupId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for updating Zendesk escalation settings (#1448). Null\r\nclears a setting back to Zendesk account defaults."
      },
      "VoiceOrderItem": {
        "type": "object",
        "properties": {
          "catalogItemId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "itemName": {
            "type": "string",
            "nullable": true
          },
          "specialInstructions": {
            "type": "string",
            "nullable": true
          },
          "modifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceOrderModifier"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VoiceOrderModifier": {
        "type": "object",
        "properties": {
          "modifierId": {
            "type": "string",
            "nullable": true
          },
          "modifierName": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "VoiceOrderRequest": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "nullable": true
          },
          "customerPhone": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string",
            "nullable": true
          },
          "customerEmail": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceOrderItem"
            },
            "nullable": true
          },
          "orderType": {
            "type": "string",
            "nullable": true
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveryAddress": {
            "type": "string",
            "nullable": true
          },
          "specialInstructions": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ZammadConnectionRequest": {
        "type": "object",
        "properties": {
          "instanceUrl": {
            "type": "string",
            "nullable": true
          },
          "apiToken": {
            "type": "string",
            "nullable": true
          },
          "defaultGroupId": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          },
          "organizationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ZendeskFieldMappingDto": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One fact-key → Zendesk custom-field mapping in the settings request."
      },
      "ZohoDeskFieldMapping": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ZohoDeskSettingsUpdate": {
        "type": "object",
        "properties": {
          "defaultDepartmentId": {
            "type": "string",
            "nullable": true
          },
          "defaultPriority": {
            "type": "string",
            "nullable": true
          },
          "defaultTags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "customFieldMappings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ZohoDeskFieldMapping"
            },
            "nullable": true
          },
          "statusMappings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. Example: \"Bearer {token}\"",
        "name": "Authorization",
        "in": "header"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "API key authentication via the X-Api-Key header. Tenant keys are prefixed \"rgl_tenant_\".",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ],
      "ApiKey": [ ]
    }
  ]
}