{
  "openapi": "3.1.0",
  "info": {
    "title": "Didnex advertiser API",
    "version": "8.27.0",
    "description": "Public advertiser integration and own-workspace API only. Session, membership, role and server-key checks still apply.\n\n8.22: Panel accounts must verify their email when requireEmailVerification is enabled (default true). Unverified sessions can read /api/me, resend verification, recover their password and log out; protected panel APIs return 403 email_verification_required. Public SDK installations do not need a panel account or an email.\n\n8.23: Optional direct delivery uses explicit consent and OS notification permission. Android may poll using JobScheduler (minimum 15 minutes; Doze/network may delay). Direct iOS, React Native and web reception is foreground only. Standard FCM/APNs/Web Push remains available for remote background notifications. No instant or force-stopped delivery is guaranteed.\n\n8.24: Push navigation/actions/variants permit HTTP or HTTPS on any domain. No executable schemes or credentials. SDK origins and receipt endpoints still require trusted HTTPS. Operational tools are role-scoped; sandbox never sends real provider traffic."
  },
  "servers": [
    {
      "url": "/",
      "description": "Same installation origin; use the canonical service origin from /api/platform for SDK configuration."
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Database readiness",
        "operationId": "get__api_health",
        "responses": {
          "200": {
            "description": "Database and release migration ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "ok"
                    },
                    "version": {
                      "const": "3.0.0"
                    },
                    "database": {
                      "const": true
                    },
                    "schemaReady": {
                      "const": true
                    },
                    "brand": {
                      "const": "Didnex"
                    }
                  },
                  "required": [
                    "status",
                    "version",
                    "database",
                    "schemaReady"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/me": {
      "get": {
        "summary": "Own account, workspaces and session-bound CSRF",
        "operationId": "get__api_me",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/orgs": {
      "post": {
        "summary": "Register an organization",
        "operationId": "post__api_orgs",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            }
          }
        }
      }
    },
    "/api/state": {
      "get": {
        "summary": "Organization data and date-bounded reports",
        "operationId": "get__api_state",
        "responses": {
          "200": {
            "description": "Authenticated scoped state. Monetary integers are milli-IRR. Publisher never receives advertiser cost or network fee. Missing denominators and out-of-scope metrics are null. Today is partial. Other state fields are retained.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "report": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AnalyticsReport"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "formats": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 7
            }
          }
        ]
      }
    },
    "/api/settings": {
      "patch": {
        "summary": "Owner updates organization and optional validated Iranian IBAN",
        "operationId": "patch__api_settings",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "iban": {
                    "type": "string",
                    "pattern": "^IR[0-9]{24}$"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/campaigns": {
      "post": {
        "summary": "Submit for review and atomically reserve the full campaign budget; insufficient free wallet balance returns 409",
        "operationId": "post__api_campaigns",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Campaign"
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{id}": {
      "patch": {
        "summary": "Change approved campaign state or safe budgets",
        "operationId": "patch__api_campaigns_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignUpdate"
              }
            }
          }
        }
      }
    },
    "/api/keys": {
      "post": {
        "summary": "Owner creates a server key (plaintext returned once)",
        "operationId": "post__api_keys",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/keys/{id}": {
      "delete": {
        "summary": "Owner revokes a server key",
        "operationId": "delete__api_keys_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/payments": {
      "post": {
        "summary": "Start enabled Zarinpal or Zibal checkout; never credits before server verification",
        "operationId": "post__api_payments",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Payment"
              }
            }
          }
        }
      }
    },
    "/api/payments/{id}/verify": {
      "post": {
        "summary": "Reconcile an owned payment with its stored gateway",
        "operationId": "post__api_payments_id_verify",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/payments/callback": {
      "get": {
        "summary": "Browser gateway return; verifies stored amount server-side",
        "operationId": "get__api_payments_callback",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "303": {
            "description": "Redirect to owned finance page"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "Authority",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/invites": {
      "post": {
        "summary": "Owner creates account-ID-bound 7-day invitation",
        "operationId": "post__api_invites",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        }
      }
    },
    "/api/invites/accept": {
      "post": {
        "summary": "Accept invitation as the verified invited identity",
        "operationId": "post__api_invites_accept",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/members/{id}": {
      "delete": {
        "summary": "Owner removes non-owner organization member",
        "operationId": "delete__api_members_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/tickets": {
      "get": {
        "summary": "Read own support and privacy requests",
        "operationId": "get__api_tickets",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ]
      },
      "post": {
        "summary": "Create support or privacy request",
        "operationId": "post__api_tickets",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Ticket"
              }
            }
          }
        }
      }
    },
    "/api/uploads": {
      "post": {
        "summary": "Upload validated image/MP4 (maximum 20 MiB)",
        "operationId": "post__api_uploads",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  },
                  "durationMs": {
                    "type": "integer",
                    "description": "Required for video campaign; max 180000"
                  }
                },
                "required": [
                  "file"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/ad/v1/conversions": {
      "post": {
        "summary": "Server-side advertiser conversion within seven-day click window",
        "operationId": "post__ad_v1_conversions",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdvertiserKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Conversion"
              }
            }
          }
        },
        "description": "Finance + fresh step-up. Pending unserved CPC campaign, nonrewarded/non-audio/non-deal. Fixed action price. Click holds budget; one matching authenticated advertiser-server result settles. CPI install / named CPA. Not independently store-verified. billed=true is settlement; duplicate=true is replay-safe. Unmatched name is analytics-only; valueRial never sets the price. Expired matching outcome rolls back conversion and payment."
      }
    },
    "/ad/v1/commerce/order": {
      "post": {
        "summary": "Upsert an authenticated merchant order, cancellation or cumulative refund; never credits wallet",
        "operationId": "post__ad_v1_commerce_order",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "Updated order or identical duplicate"
          }
        },
        "security": [
          {
            "AdvertiserKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommerceOrder"
              }
            }
          }
        }
      }
    },
    "/ad/v1/business-events": {
      "post": {
        "summary": "Attributed activation, registration or actual D7 return",
        "operationId": "post__ad_v1_business-events",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdvertiserKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessEvent"
              }
            }
          }
        }
      }
    },
    "/ad/v1/experiments/enroll": {
      "post": {
        "summary": "Stable randomized experiment enrollment before exposure",
        "operationId": "post__ad_v1_experiments_enroll",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdvertiserKey": []
          },
          {
            "PublisherKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Didnex-Scope",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "serve"
              ]
            },
            "description": "Publisher serve-key experiment calls require this header; omit for advertiser conversions keys."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExperimentEnrollment"
              }
            }
          }
        }
      }
    },
    "/ad/v1/experiments/outcome": {
      "post": {
        "summary": "Record one primary outcome per enrolled participant in either arm",
        "operationId": "post__ad_v1_experiments_outcome",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdvertiserKey": []
          },
          {
            "PublisherKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Didnex-Scope",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "serve"
              ]
            },
            "description": "Publisher serve-key experiment calls require this header; omit for advertiser conversions keys."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExperimentOutcome"
              }
            }
          }
        }
      }
    },
    "/api/growth/{section}": {
      "get": {
        "summary": "Scoped growth workspace, no invented data",
        "operationId": "get__api_growth_section",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "section",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "commerce",
                "quality",
                "diagnostics",
                "experience",
                "optimizer",
                "studio",
                "market",
                "experiments",
                "integrations"
              ]
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 7
            }
          }
        ]
      }
    },
    "/api/growth/appeals": {
      "post": {
        "summary": "Appeal a reviewed reversed earning",
        "operationId": "post__api_growth_appeals",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deliveryId": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "deliveryId",
                  "message"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/campaigns/{id}": {
      "patch": {
        "summary": "Set campaign category and direct-deals-only distribution",
        "operationId": "patch__api_growth_campaigns_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "general",
                      "shopping",
                      "technology",
                      "education",
                      "games",
                      "entertainment",
                      "travel",
                      "food",
                      "services"
                    ]
                  },
                  "dealOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "category",
                  "dealOnly"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/rules": {
      "post": {
        "summary": "Create an explainable, optionally enabled optimization rule",
        "operationId": "post__api_growth_rules",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerRule"
              }
            }
          }
        }
      }
    },
    "/api/growth/rules/{id}": {
      "patch": {
        "summary": "Enable or disable an owned rule",
        "operationId": "patch__api_growth_rules_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/optimizer/evaluate": {
      "post": {
        "summary": "Evaluate enabled rules with mature cohort evidence (one-minute rate per rule)",
        "operationId": "post__api_growth_optimizer_evaluate",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/optimizer/undo": {
      "post": {
        "summary": "Undo an optimizer pause only if campaign control version is unchanged",
        "operationId": "post__api_growth_optimizer_undo",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/studio/suggest": {
      "post": {
        "summary": "Generate Persian template variants; no external LLM call",
        "operationId": "post__api_growth_studio_suggest",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 35
                  },
                  "offer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 25
                  }
                },
                "required": [
                  "product",
                  "offer"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/variants": {
      "post": {
        "summary": "Submit creative variant for moderation",
        "operationId": "post__api_growth_variants",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreativeVariant"
              }
            }
          }
        }
      }
    },
    "/api/growth/variants/{id}": {
      "patch": {
        "summary": "Pause/resume previously approved creative variant",
        "operationId": "patch__api_growth_variants_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/deals": {
      "post": {
        "summary": "Propose fixed-price, budget-capped direct placement deal",
        "operationId": "post__api_growth_deals",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarketDeal"
              }
            }
          }
        }
      }
    },
    "/api/growth/deals/{id}": {
      "patch": {
        "summary": "Publisher accepts/rejects proposal; either party may cancel",
        "operationId": "patch__api_growth_deals_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "rejected",
                      "cancelled"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/growth/experiments": {
      "post": {
        "summary": "Pre-register owned campaign/unit experiment and observation window",
        "operationId": "post__api_growth_experiments",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Experiment"
              }
            }
          }
        }
      }
    },
    "/api/growth/experiments/{id}": {
      "patch": {
        "summary": "Start, stop recruitment, or close experiment after all observation windows",
        "operationId": "patch__api_growth_experiments_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "observing",
                      "closed"
                    ]
                  },
                  "completeCohortCapture": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/account": {
      "get": {
        "summary": "Own persistent account profile and organizations; independent session required",
        "operationId": "get__api_account",
        "responses": {
          "200": {
            "description": "Own profile only",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account": {
                      "$ref": "#/components/schemas/AccountProfile"
                    },
                    "organizations": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "required": [
                    "account",
                    "organizations"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ]
      },
      "patch": {
        "summary": "Update own app display name, contact phone and preferred activity; cannot change login identity or roles",
        "operationId": "patch__api_account",
        "responses": {
          "200": {
            "description": "Saved app profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account": {
                      "$ref": "#/components/schemas/AccountProfile"
                    }
                  },
                  "required": [
                    "account"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountUpdate"
              }
            }
          }
        }
      }
    },
    "/api/account/register": {
      "post": {
        "summary": "Complete profile and create/reuse canonical owned workspace in one transaction; replay does not add balances",
        "operationId": "post__api_account_register",
        "responses": {
          "201": {
            "description": "Completed account and workspace; money starts at zero",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orgId": {
                      "type": "string"
                    },
                    "existing": {
                      "type": "boolean"
                    },
                    "account": {
                      "$ref": "#/components/schemas/AccountProfile"
                    }
                  },
                  "required": [
                    "orgId",
                    "existing",
                    "account"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "Existing organization reused"
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountRegistration"
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{id}/targeting": {
      "patch": {
        "summary": "Save multi-select OS, form factor and app/site filters for future deliveries; OR within a group, AND between groups",
        "operationId": "patch__api_campaigns_id_targeting",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targeting": {
                    "$ref": "#/components/schemas/DeviceTargeting"
                  }
                },
                "required": [
                  "targeting"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{id}/targeting/preview": {
      "post": {
        "summary": "Preview stored or supplied unsaved device rules; no ad request or reservation is created",
        "operationId": "post__api_campaigns_id_targeting_preview",
        "responses": {
          "200": {
            "description": "Device rule match only; other delivery requirements still apply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "allowed": {
                      "type": "boolean"
                    },
                    "context": {
                      "type": "object"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "reservationCreated": {
                      "const": false
                    },
                    "notice": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "allowed",
                    "context",
                    "reason",
                    "reservationCreated",
                    "notice"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TargetingPreview"
              }
            }
          }
        }
      }
    },
    "/api/auth/config": {
      "get": {
        "summary": "Password policy and actual email/MFA capability",
        "operationId": "get__api_auth_config",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfig"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/auth/register": {
      "post": {
        "summary": "Create independent account, owned workspace and session atomically; email-only password recovery",
        "operationId": "post__api_auth_register",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Secure HttpOnly SameSite=Lax host-only session or expired cookie"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRegister"
              }
            }
          }
        },
        "description": "Account, workspace, session, hashed one-use verification token and encrypted email outbox are one transaction. Returns no raw verification token. With mandatory verification, missing mail configuration returns 503 mail_not_configured before creating an account. A successful signup still requires the emailed link before panel access."
      }
    },
    "/api/auth/login": {
      "post": {
        "summary": "Authenticate email/password; rotate session token; generic failure",
        "operationId": "post__api_auth_login",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AuthResult"
                    },
                    {
                      "$ref": "#/components/schemas/MfaChallenge"
                    }
                  ]
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Secure HttpOnly SameSite=Lax host-only session or expired cookie"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordLogin"
              }
            }
          }
        }
      }
    },
    "/api/auth/recover": {
      "post": {
        "summary": "Removed password recovery key method; always returns 410 email_recovery_required",
        "operationId": "post__api_auth_recover",
        "responses": {
          "410": {
            "description": "Use /api/security/email-reset-request and /api/security/email-reset"
          }
        },
        "security": []
      }
    },
    "/api/auth/activate": {
      "post": {
        "summary": "Consume operator-issued one-use token; preserve legacy account ID and organizations",
        "operationId": "post__api_auth_activate",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Secure HttpOnly SameSite=Lax host-only session or expired cookie"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordActivation"
              }
            }
          }
        }
      }
    },
    "/api/auth/password": {
      "post": {
        "summary": "Verify current password and rotate credentials and sessions; no recovery key is issued",
        "operationId": "post__api_auth_password",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Secure HttpOnly SameSite=Lax host-only session or expired cookie"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "summary": "Revoke current session and expire cookie",
        "operationId": "post__api_auth_logout",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Secure HttpOnly SameSite=Lax host-only session or expired cookie"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/auth/logout-all": {
      "post": {
        "summary": "Revoke all own sessions and expire cookie",
        "operationId": "post__api_auth_logout-all",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                },
                "description": "Secure HttpOnly SameSite=Lax host-only session or expired cookie"
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/auth/sessions": {
      "get": {
        "summary": "List own current valid sessions; no tokens, hashes or raw IPs",
        "operationId": "get__api_auth_sessions",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "description": "Lists active sessions and rememberedDevices for the current account. Tokens and hashes are omitted. A remembered browser may remain listed while its active session is idle."
      }
    },
    "/api/auth/sessions/{id}": {
      "delete": {
        "summary": "Revoke own session only; clear cookie when revoking current session",
        "operationId": "delete__api_auth_sessions_id",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/auth/mfa-login": {
      "post": {
        "summary": "Complete a five-minute one-use MFA login challenge",
        "operationId": "post__api_auth_mfa-login",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaLogin"
              }
            }
          }
        }
      }
    },
    "/api/security": {
      "get": {
        "summary": "Own MFA, verified email and step-up capability",
        "operationId": "get__api_security",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ]
      }
    },
    "/api/security/step-up": {
      "post": {
        "summary": "Reconfirm password and enabled MFA for ten minutes",
        "operationId": "post__api_security_step-up",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepUp"
              }
            }
          }
        }
      }
    },
    "/api/security/send-verification": {
      "post": {
        "summary": "Queue an encrypted one-use email verification link",
        "operationId": "post__api_security_send-verification",
        "responses": {
          "200": {
            "description": "Queued or already verified",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "queued": {
                      "type": "boolean"
                    },
                    "alreadyVerified": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "integer"
                    },
                    "retryAfterSeconds": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        "description": "Available to the signed-in unverified account. Queues a link for the current credential version. A 60-second cooldown and three requests per hour apply; 429 verification_cooldown asks the user to wait. Already verified accounts return alreadyVerified:true. No token is returned."
      }
    },
    "/api/security/verify-email": {
      "post": {
        "summary": "Consume a one-use email verification token",
        "operationId": "post__api_security_verify-email",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "description": "Public same-origin link redemption. One use, finite expiry, current credential version and active account are required. Expired, stale or consumed links return 410. Redeeming in another browser unlocks existing sessions after /api/me is refreshed."
      }
    },
    "/api/security/email-reset-request": {
      "post": {
        "summary": "Generic response; queue a reset link only to the registered address of an active password account; prior email verification not required",
        "operationId": "post__api_security_email-reset-request",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/security/email-reset": {
      "post": {
        "summary": "Reset password; preserve MFA and revoke sessions",
        "operationId": "post__api_security_email-reset",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "newPassword": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "description": "Must satisfy the current administrator minimum from /api/auth/config"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  },
                  "backupCode": {
                    "type": "string",
                    "description": "One-use private backup code; alternative to TOTP"
                  }
                },
                "required": [
                  "token",
                  "newPassword"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/security/mfa/setup": {
      "post": {
        "summary": "Create an encrypted pending TOTP secret; recent step-up required",
        "operationId": "post__api_security_mfa_setup",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/security/mfa/enable": {
      "post": {
        "summary": "Confirm TOTP and return eight one-use backup codes once",
        "operationId": "post__api_security_mfa_enable",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                },
                "required": [
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/security/mfa/disable": {
      "post": {
        "summary": "Disable MFA with recent step-up and a fresh proof",
        "operationId": "post__api_security_mfa_disable",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  },
                  "backupCode": {
                    "type": "string",
                    "description": "One-use private backup code; alternative to TOTP"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro": {
      "get": {
        "summary": "Own organization advanced workspaces",
        "operationId": "get__api_pro",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ]
      }
    },
    "/api/pro/notifications": {
      "post": {
        "summary": "Mark organization notifications read",
        "operationId": "post__api_pro_notifications",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro/channels": {
      "post": {
        "summary": "Owner creates verified-email or signed-webhook channel; secret returned once",
        "operationId": "post__api_pro_channels",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "email",
                      "webhook"
                    ]
                  },
                  "destination": {
                    "type": "string"
                  },
                  "revenueUpdates": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro/channels/{id}": {
      "delete": {
        "summary": "Owner disables a notification channel",
        "operationId": "delete__api_pro_channels_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/pro/rules": {
      "post": {
        "summary": "Create real-data alert with a cooldown",
        "operationId": "post__api_pro_rules",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRule"
              }
            }
          }
        }
      }
    },
    "/api/pro/rules/{id}": {
      "delete": {
        "summary": "Delete own alert rule",
        "operationId": "delete__api_pro_rules_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/pro/campaigns/{id}": {
      "put": {
        "summary": "Advertiser updates pacing, schedules, context, app links and catalog",
        "operationId": "put__api_pro_campaigns_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignControls"
              }
            }
          }
        }
      }
    },
    "/api/pro/catalogs": {
      "post": {
        "summary": "Create own product catalog; feed hostname must be allowed by operator",
        "operationId": "post__api_pro_catalogs",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "feedUrl": {
                    "type": "string"
                  },
                  "intervalMinutes": {
                    "type": "integer",
                    "minimum": 15,
                    "maximum": 1440
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro/catalogs/{id}": {
      "patch": {
        "summary": "Enable or pause own catalog sync",
        "operationId": "patch__api_pro_catalogs_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro/catalogs/{id}/import": {
      "post": {
        "summary": "Atomically import a complete feed; missing products become out of stock",
        "operationId": "post__api_pro_catalogs_id_import",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CatalogFeed"
              }
            }
          }
        }
      }
    },
    "/api/pro/catalogs/{id}/sync": {
      "post": {
        "summary": "Fetch own allowed HTTPS JSON feed; redirects rejected",
        "operationId": "post__api_pro_catalogs_id_sync",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro/attribution-apps": {
      "post": {
        "summary": "Map Apple production app/source to own campaign",
        "operationId": "post__api_pro_attribution-apps",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "advertisedItemId": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourcePrefix": {
                    "type": "string",
                    "pattern": "^[0-9]{2}$"
                  },
                  "networkIdentifier": {
                    "type": "string"
                  }
                },
                "required": [
                  "campaignId",
                  "advertisedItemId",
                  "sourcePrefix",
                  "networkIdentifier"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/pro/attribution-apps/{id}": {
      "delete": {
        "summary": "Remove own Apple attribution mapping",
        "operationId": "delete__api_pro_attribution-apps_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/ad/v1/install": {
      "post": {
        "summary": "Advertiser-reported install linked to a valid own click; no independent device proof",
        "operationId": "post__ad_v1_install",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdvertiserKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "android",
                      "ios"
                    ]
                  },
                  "clickId": {
                    "type": "string"
                  },
                  "installedAt": {
                    "type": "integer"
                  }
                },
                "required": [
                  "externalId",
                  "platform",
                  "clickId",
                  "installedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/ad/v1/attribution/apple": {
      "post": {
        "summary": "Verify Apple production ES256 JWS and count unique winning mapped postbacks",
        "operationId": "post__ad_v1_attribution_apple",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jws-string": {
                    "type": "string"
                  }
                },
                "required": [
                  "jws-string"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/ad/v1/attribution/partner/{id}": {
      "post": {
        "summary": "Receive signed MMP event; partner key is configured by operator",
        "operationId": "post__ad_v1_attribution_partner_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Didnex-Timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unix seconds, within five minutes"
            }
          },
          {
            "name": "X-Didnex-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Base64url HMAC-SHA256(secret, timestamp + dot + exact UTF-8 JSON body)"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "externalId": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "android",
                      "ios"
                    ]
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "install",
                      "reengagement",
                      "purchase"
                    ]
                  },
                  "occurredAt": {
                    "type": "integer"
                  },
                  "valueRial": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "campaignId",
                  "externalId",
                  "platform",
                  "event",
                  "occurredAt"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agency": {
      "get": {
        "summary": "Own agencies, incoming client approvals and proposals",
        "operationId": "get__api_agency",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ]
      }
    },
    "/api/agency/create": {
      "post": {
        "summary": "Create an agency and owner membership",
        "operationId": "post__api_agency_create",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agency/dashboard": {
      "get": {
        "summary": "Read only explicitly approved client campaigns",
        "operationId": "get__api_agency_dashboard",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "agency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agency/request-client": {
      "post": {
        "summary": "Request client access; owner must approve",
        "operationId": "post__api_agency_request-client",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agencyId": {
                    "type": "string"
                  },
                  "orgId": {
                    "type": "string"
                  }
                },
                "required": [
                  "agencyId",
                  "orgId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agency/client-review": {
      "post": {
        "summary": "Client owner grants or revokes agency access",
        "operationId": "post__api_agency_client-review",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agencyId": {
                    "type": "string"
                  },
                  "orgId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "revoked"
                    ]
                  }
                },
                "required": [
                  "agencyId",
                  "orgId",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agency/member": {
      "post": {
        "summary": "Agency owner manages account-ID-bound members",
        "operationId": "post__api_agency_member",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agencyId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "manager",
                      "viewer"
                    ]
                  },
                  "remove": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "agencyId",
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agency/propose": {
      "post": {
        "summary": "Propose a version-bound client campaign change",
        "operationId": "post__api_agency_propose",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agencyId": {
                    "type": "string"
                  },
                  "campaignId": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "pause",
                      "resume",
                      "daily_budget"
                    ]
                  },
                  "daily": {
                    "type": "integer",
                    "minimum": 1000
                  }
                },
                "required": [
                  "agencyId",
                  "campaignId",
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agency/proposal-review": {
      "post": {
        "summary": "Client owner approves once; SQL enforces version and access",
        "operationId": "post__api_agency_proposal-review",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "approved",
                      "rejected"
                    ]
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/studio": {
      "get": {
        "summary": "Own paginated studio projects, brand kit and declared export diagnostics",
        "operationId": "get__api_studio",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          }
        ]
      }
    },
    "/api/studio/projects": {
      "post": {
        "summary": "Save a one-to-eight-scene project with own image references",
        "operationId": "post__api_studio_projects",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioProjectInput"
              }
            }
          }
        },
        "description": "Total scene duration: 5000–60000 ms. Server validates colors, formats, unique scene IDs and own non-quarantined image references. Scene JSON is data, never executable HTML."
      }
    },
    "/api/studio/projects/{id}": {
      "get": {
        "summary": "Read an own project including archived projects",
        "operationId": "get__api_studio_projects_id",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioProject"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "Update an own project only at the current version; 409 preserves concurrent edits",
        "operationId": "put__api_studio_projects_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioProjectUpdate"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Reversibly archive or restore an own project with a version check",
        "operationId": "patch__api_studio_projects_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "version",
                  "archived"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/studio/brand": {
      "put": {
        "summary": "Create or update own brand colors and logo with a version check",
        "operationId": "put__api_studio_brand",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioBrand"
              }
            }
          }
        }
      }
    },
    "/api/studio/library": {
      "get": {
        "summary": "Search and paginate own creative files, tags and archive state",
        "operationId": "get__api_studio_library",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          }
        ]
      }
    },
    "/api/studio/library/{id}": {
      "patch": {
        "summary": "Rename/tag or reversibly archive own file; cannot change operator quarantine",
        "operationId": "patch__api_studio_library_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 30
                    },
                    "maxItems": 10
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/studio/exports": {
      "post": {
        "summary": "Start an own export diagnostic record; data is client reported",
        "operationId": "post__api_studio_exports",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioExportStart"
              }
            }
          }
        }
      }
    },
    "/api/studio/exports/{id}": {
      "patch": {
        "summary": "Update export state; uploaded requires a same-organization matching-format creative",
        "operationId": "patch__api_studio_exports_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioExportUpdate"
              }
            }
          }
        },
        "description": "recording -> rendered/failed/cancelled; rendered -> uploaded/failed/cancelled. Terminal retries are idempotent. Declared export diagnostics do not create paid impressions or financial entries."
      }
    },
    "/api/studio/campaign-tools": {
      "get": {
        "summary": "Own variant schedules and campaign tracking",
        "operationId": "get__api_studio_campaign-tools",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ]
      }
    },
    "/api/studio/campaign-tracking/{id}": {
      "put": {
        "summary": "Set UTM parameters; values are snapshotted on future signed deliveries",
        "operationId": "put__api_studio_campaign-tracking_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parameters": {
                    "$ref": "#/components/schemas/TrackingParameters"
                  }
                },
                "required": [
                  "parameters"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/studio/variant-controls/{id}": {
      "put": {
        "summary": "Set own reviewed variant time window and rotation weight",
        "operationId": "put__api_studio_variant-controls_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startsAt": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "endsAt": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "weight": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                },
                "required": [
                  "weight"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/insights": {
      "get": {
        "summary": "Role-scoped comparison, hourly heatmap, financial/creative/SDK and export insights",
        "operationId": "get__api_insights",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Required for organization reports"
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 7
            }
          }
        ],
        "description": "Previous window is immediately adjacent and equal in elapsed duration. Tehran calendar day start. Missing/zero denominators are null. Latency percentiles use nearest rank over at most the last 10000 loaded SDK samples. Session hashes rotate daily and are not unique people. Video completions share the starts-in-window cohort. Conversions count distinct clicked deliveries with a later valid conversion in seven days, observed by asOf. Publisher never receives advertiser spend, conversions, campaign lists or operator data."
      }
    },
    "/api/location": {
      "get": {
        "summary": "Read own geo rules and scoped 30-day approximate-IP report",
        "operationId": "get__api_location",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ]
      }
    },
    "/api/location/{kind}/{id}": {
      "put": {
        "summary": "Update owned asset/campaign geo rule; campaign replaces legacy country with ALL",
        "operationId": "put__api_location_kind_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "campaign",
                "asset"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "$ref": "#/components/schemas/LocationRule"
                  }
                },
                "required": [
                  "rules"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/location/preview": {
      "post": {
        "summary": "Nonfinancial approximate location-rule preview",
        "operationId": "post__api_location_preview",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "$ref": "#/components/schemas/LocationRule"
                  },
                  "location": {
                    "type": "object"
                  }
                },
                "required": [
                  "rules",
                  "location"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/platform": {
      "get": {
        "summary": "Public brand, contact, verified service origin and signup flags; no secrets",
        "operationId": "get__api_platform",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/payments/zibal/callback": {
      "get": {
        "summary": "Zibal browser return; only a matching complete server receipt credits the stored order",
        "operationId": "get__api_payments_zibal_callback",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "303": {
            "description": "Redirect to finance; query amount/reference is never trusted"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "trackId",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,15}$"
            }
          },
          {
            "name": "success",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/automation": {
      "get": {
        "summary": "Own bid, floor, rotation policies and immutable decision evidence",
        "operationId": "get__api_automation",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ]
      }
    },
    "/api/automation/bid": {
      "post": {
        "summary": "Save bounded CPA/ROAS policy; mature orders required for evaluation",
        "operationId": "post__api_automation_bid",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "goal": {
                    "type": "string",
                    "enum": [
                      "cpa",
                      "roas"
                    ]
                  },
                  "target": {
                    "type": "integer",
                    "description": "CPA IRR, ROAS basis points"
                  },
                  "minRateToman": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "maxRateToman": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "lookbackDays": {
                    "type": "integer",
                    "minimum": 7,
                    "maximum": 30
                  },
                  "delayHours": {
                    "type": "integer",
                    "minimum": 24,
                    "maximum": 168
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "version": {
                    "type": "integer"
                  }
                },
                "required": [
                  "campaignId",
                  "goal",
                  "target",
                  "minRateToman",
                  "maxRateToman"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/automation/rotation": {
      "post": {
        "summary": "Weight only publishable approved variants",
        "operationId": "post__api_automation_rotation",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "minViews": {
                    "type": "integer",
                    "minimum": 200
                  },
                  "dropBps": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "resetWeights": {
                    "type": "boolean"
                  },
                  "version": {
                    "type": "integer"
                  }
                },
                "required": [
                  "campaignId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/automation/evaluate": {
      "post": {
        "summary": "Evaluate due policies without bypassing sample/time limits",
        "operationId": "post__api_automation_evaluate",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/automation/undo": {
      "post": {
        "summary": "Restore last valid change and freeze restored value",
        "operationId": "post__api_automation_undo",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/sequences": {
      "get": {
        "summary": "Own consented story campaigns and current-version statistics",
        "operationId": "get__api_sequences",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ]
      },
      "post": {
        "summary": "Create draft with 2-6 unique owned campaigns",
        "operationId": "post__api_sequences",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "steps": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "properties": {
                        "campaignId": {
                          "type": "string"
                        },
                        "requiredViews": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 5
                        },
                        "minGapSeconds": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 21600
                        }
                      },
                      "required": [
                        "campaignId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "name",
                  "steps"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/sequences/{id}": {
      "patch": {
        "summary": "Enable/disable with revision and explicit consent-only policy confirmation",
        "operationId": "patch__api_sequences_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "confirmSequenceOnly": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete only a disabled owned sequence",
        "operationId": "delete__api_sequences_id",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmDelete": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/audio-assets": {
      "get": {
        "summary": "Owned audio library and scoped Tehran-day delivery-cohort report; SDK-reported playback, no independent listening claim",
        "operationId": "get__api_audio-assets",
        "responses": {
          "200": {
            "description": "files (at most 100), targets (at most 200), compatibility statistics, report with totals/daily/funnel/leaders/platforms/noFillReasons; monetary Milli fields are thousandths of IRR; null ratio without denominator; advertiser requests and fill are null"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                7,
                14,
                30
              ],
              "default": 7
            }
          },
          {
            "name": "targetId",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Owned audio campaign for advertiser, owned audio unit for publisher; omitted means all"
            }
          }
        ]
      },
      "post": {
        "summary": "Upload full validated MP3/PCM WAV, 3-180 seconds",
        "operationId": "post__api_audio-assets",
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization membership is checked by the server."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "transcript": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "companionId": {
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/playables": {
      "get": {
        "summary": "List own curated playable creatives",
        "operationId": "get__api_playables",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      },
      "post": {
        "summary": "Create a bounded playable template",
        "operationId": "post__api_playables",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayableInput"
              }
            }
          }
        }
      }
    },
    "/api/media-processing": {
      "get": {
        "summary": "List own adaptive video jobs and live processor readiness",
        "operationId": "get__api_media_processing",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      },
      "post": {
        "summary": "Queue idempotent real three-profile transcoding",
        "operationId": "post__api_media_processing",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted, not completed"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "creativeId": {
                    "type": "string"
                  }
                },
                "required": [
                  "creativeId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/media-processing/{id}/retry": {
      "post": {
        "summary": "Retry own failed video job",
        "operationId": "post__api_media_processing__id__retry",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted, not completed"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        }
      }
    },
    "/api/studio-collaboration/{projectId}": {
      "get": {
        "summary": "Read exact project revision, bounded history, comments and reviews",
        "operationId": "get__api_studio_collaboration__projectId_",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/studio-collaboration/{projectId}/comments": {
      "post": {
        "summary": "Comment on a frame and normalized region",
        "operationId": "post__api_studio_collaboration__projectId__comments",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioComment"
              }
            }
          }
        }
      }
    },
    "/api/studio-collaboration/{projectId}/comments/{id}": {
      "patch": {
        "summary": "Resolve/reopen authorized comment",
        "operationId": "patch__api_studio_collaboration__projectId__comments__id_",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "resolved"
                    ]
                  }
                },
                "required": [
                  "version",
                  "status"
                ]
              }
            }
          }
        }
      }
    },
    "/api/studio-collaboration/{projectId}/reviews": {
      "post": {
        "summary": "Independent owner/manager reviews current revision",
        "operationId": "post__api_studio_collaboration__projectId__reviews",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioReview"
              }
            }
          }
        }
      }
    },
    "/api/studio-collaboration/policy": {
      "get": {
        "summary": "Read studio team-review requirement",
        "operationId": "get__api_studio_collaboration_policy",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      },
      "put": {
        "summary": "Owner changes studio review policy",
        "operationId": "put__api_studio_collaboration_policy",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "required"
                ]
              }
            }
          }
        }
      }
    },
    "/api/forecast": {
      "post": {
        "summary": "Forecast matched inventory opportunities with explicit assumptions",
        "operationId": "post__api_forecast",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForecastInput"
              }
            }
          }
        }
      }
    },
    "/api/customer-analytics": {
      "get": {
        "summary": "Read aggregated mature-day retention, net LTV and ordered funnels",
        "operationId": "get__api_customer_analytics",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      }
    },
    "/api/customer-analytics/funnels": {
      "post": {
        "summary": "Define a visual conversion funnel",
        "operationId": "post__api_customer_analytics_funnels",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FunnelInput"
              }
            }
          }
        }
      }
    },
    "/api/customer-analytics/funnels/{id}": {
      "delete": {
        "summary": "Delete own funnel definition",
        "operationId": "delete__api_customer_analytics_funnels__id_",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      }
    },
    "/api/budgets": {
      "get": {
        "summary": "Read own shared caps, accounting start and snapshot assignments",
        "operationId": "get__api_budgets",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      },
      "post": {
        "summary": "Finance/owner creates shared budget",
        "operationId": "post__api_budgets",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetInput"
              }
            }
          }
        }
      }
    },
    "/api/budgets/{id}": {
      "patch": {
        "summary": "Finance/owner CAS-updates cap and enabled status",
        "operationId": "patch__api_budgets__id_",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetPatch"
              }
            }
          }
        }
      }
    },
    "/api/budgets/{id}/campaigns": {
      "put": {
        "summary": "Finance/owner assigns own campaigns to a team cap",
        "operationId": "put__api_budgets__id__campaigns",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "campaignIds"
                ]
              }
            }
          }
        }
      }
    },
    "/api/reporting": {
      "get": {
        "summary": "Read authorized schedules, own jobs, metrics and mail receipts",
        "operationId": "get__api_reporting",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      }
    },
    "/api/reporting/generate": {
      "post": {
        "summary": "Finance/owner queues a private actual PDF; no automatic email",
        "operationId": "post__api_reporting_generate",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted, not completed"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportInput"
              }
            }
          }
        }
      }
    },
    "/api/reporting/schedules": {
      "post": {
        "summary": "Explicitly select authorized verified financial recipients",
        "operationId": "post__api_reporting_schedules",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportScheduleInput"
              }
            }
          }
        }
      }
    },
    "/api/reporting/schedules/{id}": {
      "patch": {
        "summary": "CAS pause/enable an authorized report schedule",
        "operationId": "patch__api_reporting_schedules__id_",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "version",
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/api/reporting/files/{jobId}": {
      "get": {
        "summary": "Download private PDF; current financial membership required",
        "operationId": "get__api_reporting_files__jobId_",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Private PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Current organization membership and operation role checked."
          }
        ]
      }
    },
    "/ad/v1/customer-events": {
      "post": {
        "summary": "Server-only consented advertiser customer event, never wallet credit",
        "operationId": "post__ad_v1_customer_events",
        "security": [
          {
            "AdvertiserKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid bounded input"
          },
          "403": {
            "description": "Permission, consent, origin or independent-review requirement failed"
          },
          "409": {
            "description": "State/version conflict or prerequisite missing"
          },
          "503": {
            "description": "Required connection unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEvent"
              }
            }
          }
        },
        "description": "No browser Origin allowed. Conversions scope required. Unique externalId+content hash, one purchase per opaque order, atomic capped refunds; advertiser-reported analytics only."
      }
    },
    "/api/playables/{id}/preview": {
      "get": {
        "summary": "Own private playable preview; no ad request, financial reservation or reward",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Private nonced restricted HTML preview"
          },
          "403": {
            "description": "Not a member"
          },
          "404": {
            "description": "Foreign or absent playable"
          }
        }
      }
    },
    "/api/playables/templates/{template}/preview": {
      "get": {
        "summary": "Private template trial without creating a creative, request, wallet reservation or reward",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "template",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "tap_target",
                "memory_pairs",
                "color_match",
                "quick_math",
                "number_order",
                "sequence_memory"
              ]
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Nonced sandboxed HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required"
          },
          "403": {
            "description": "Current organization membership required"
          },
          "404": {
            "description": "Unknown template"
          }
        }
      }
    },
    "/api/payments/{id}/email-receipt": {
      "post": {
        "summary": "Queue existing verified payment receipt to acting verified owner/finance member; deduplicates repeated requests",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Receipt queued or existing queue ID"
          },
          "404": {
            "description": "Payment not owned"
          },
          "409": {
            "description": "Payment or recipient not eligible"
          }
        }
      }
    },
    "/api/next/budget-plan": {
      "post": {
        "summary": "budget-plan — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/next/fatigue": {
      "get": {
        "summary": "fatigue — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/next/stories": {
      "get": {
        "summary": "stories — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/next/landings": {
      "get": {
        "summary": "landings — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "landings — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "patch": {
        "summary": "landings — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/next/coupons": {
      "get": {
        "summary": "coupons — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "coupons — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "patch": {
        "summary": "coupons — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/next/coupons/redeem": {
      "post": {
        "summary": "coupons/redeem — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/next/leads": {
      "get": {
        "summary": "leads — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "leads — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "patch": {
        "summary": "leads — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "delete": {
        "summary": "leads — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/next/leads/reveal": {
      "post": {
        "summary": "leads/reveal — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/next/studio-batches": {
      "get": {
        "summary": "studio-batches — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "studio-batches — advertiser",
        "tags": [
          "Didnex growth 8.6"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-organization-role": "advertiser",
        "responses": {
          "200": {
            "description": "Stored values or report; scoped to current organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role or organization scope denied"
          },
          "409": {
            "description": "Version conflict, exhausted capacity or missing prerequisite"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/payments/quote": {
      "post": {
        "summary": "پیش‌فاکتور امضاشده پرداخت؛ مبلغ خالص، مالیات و جمع. برای ادامه سفارش موجود idempotencyKey و provider قبلی را بفرستید.",
        "tags": [
          "Release 8.10"
        ],
        "responses": {
          "200": {
            "description": "Successful authenticated response"
          },
          "403": {
            "description": "Role or ownership denied"
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "x-audiences": [
          "advertiser"
        ]
      }
    },
    "/api/interactive-creatives": {
      "get": {
        "summary": "فهرست کاروسل و نظرسنجی و آمار همان سازمان",
        "tags": [
          "Release 8.10"
        ],
        "responses": {
          "200": {
            "description": "Successful authenticated response"
          },
          "403": {
            "description": "Role or ownership denied"
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-audiences": [
          "advertiser"
        ]
      },
      "post": {
        "summary": "ساخت کاروسل ۲ تا ۶ کارت تصویر یا نظرسنجی ۲ تا ۵ گزینه؛ فقط فایل‌های سازمان جاری",
        "tags": [
          "Release 8.10"
        ],
        "responses": {
          "200": {
            "description": "Successful authenticated response"
          },
          "403": {
            "description": "Role or ownership denied"
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-audiences": [
          "advertiser"
        ]
      }
    },
    "/api/destination-health": {
      "get": {
        "summary": "سوابق بررسی HTTP/TLS مقصد کمپین‌های سازمان",
        "tags": [
          "Release 8.10"
        ],
        "responses": {
          "200": {
            "description": "Successful authenticated response"
          },
          "403": {
            "description": "Role or ownership denied"
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-audiences": [
          "advertiser"
        ]
      }
    },
    "/api/referrals": {
      "get": {
        "summary": "کد معرفی یا معرف حساب و کمیسیون قطعی",
        "tags": [
          "Release 8.10"
        ],
        "responses": {
          "200": {
            "description": "Successful authenticated response"
          },
          "403": {
            "description": "Role or ownership denied"
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-audiences": [
          "publisher",
          "advertiser"
        ]
      },
      "post": {
        "summary": "مالک ناشر کد می‌سازد؛ مالک تبلیغ‌دهنده code معرف را پیش از اولین پرداخت ثبت می‌کند",
        "tags": [
          "Release 8.10"
        ],
        "responses": {
          "200": {
            "description": "Successful authenticated response"
          },
          "403": {
            "description": "Role or ownership denied"
          }
        },
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "x-audiences": [
          "publisher",
          "advertiser"
        ]
      }
    },
    "/api/server-growth/no-fill": {
      "get": {
        "summary": "Server growth no-fill",
        "description": "Request-time preauction snapshot, 200 recent campaigns, 7-day retention. Publisher aggregated reasons, advertiser own campaigns, admin detail. Does not replay visitor frequency, auction, variants, sequence or races.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped real stored data"
          },
          "403": {
            "description": "Membership/role required"
          }
        }
      }
    },
    "/api/server-growth/reconciliation": {
      "get": {
        "summary": "Server growth reconciliation",
        "description": "Finance role, read-only. Latest 10000 earnings, ledger account balances and campaign reservations including outcome holds and partner escrow. Completeness explicit.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped real stored data"
          },
          "403": {
            "description": "Membership/role required"
          }
        }
      }
    },
    "/api/server-growth/sponsorship": {
      "get": {
        "summary": "Server growth sponsorship",
        "description": "Hourly offers coexist with old weekly contracts: 1-168 hours, capacity multiple of 1000, no overlap in one listing, actual CPM impressions only; delivery not guaranteed.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped real stored data"
          },
          "403": {
            "description": "Membership/role required"
          }
        }
      }
    },
    "/api/server-growth/outcomes": {
      "get": {
        "summary": "Server growth outcomes",
        "description": "Finance + fresh step-up. Pending unserved CPC campaign, nonrewarded/non-audio/non-deal. Fixed action price. Click holds budget; one matching authenticated advertiser-server result settles. CPI install / named CPA. Not independently store-verified.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped real stored data"
          },
          "403": {
            "description": "Membership/role required"
          }
        }
      },
      "post": {
        "summary": "Configure outcomes",
        "description": "Finance + fresh step-up. Pending unserved CPC campaign, nonrewarded/non-audio/non-deal. Fixed action price. Click holds budget; one matching authenticated advertiser-server result settles. CPI install / named CPA. Not independently store-verified.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "model": {
                    "enum": [
                      "CPI",
                      "CPA"
                    ]
                  },
                  "eventName": {
                    "type": "string"
                  },
                  "windowHours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 168
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved or idempotent receipt"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Permission, CSRF or step-up required"
          },
          "409": {
            "description": "Version, lifecycle, funding or contract conflict"
          }
        }
      }
    },
    "/api/server-growth/budgets": {
      "get": {
        "summary": "Server growth budgets",
        "description": "Finance + fresh step-up. Same organization, active/pending non-deal campaigns, explicit approval, free uncommitted budget, daily floor, optimistic versions and idempotency key. Suggestions never move money.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped real stored data"
          },
          "403": {
            "description": "Membership/role required"
          }
        }
      },
      "post": {
        "summary": "Configure budgets",
        "description": "Finance + fresh step-up. Same organization, active/pending non-deal campaigns, explicit approval, free uncommitted budget, daily floor, optimistic versions and idempotency key. Suggestions never move money.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceCampaign": {
                    "type": "string"
                  },
                  "targetCampaign": {
                    "type": "string"
                  },
                  "sourceVersion": {
                    "type": "integer"
                  },
                  "targetVersion": {
                    "type": "integer"
                  },
                  "amountToman": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 100
                  },
                  "approved": {
                    "const": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved or idempotent receipt"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Permission, CSRF or step-up required"
          },
          "409": {
            "description": "Version, lifecycle, funding or contract conflict"
          }
        }
      }
    },
    "/api/server-growth/quality": {
      "get": {
        "summary": "Server growth quality",
        "description": "Advertiser owner/manager. Periodic HTTPS reachability and redirect-host allowlist, not malware certification. Resume requires fresh successful same-destination check under one hour old.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped real stored data"
          },
          "403": {
            "description": "Membership/role required"
          }
        }
      },
      "post": {
        "summary": "Configure quality",
        "description": "Advertiser owner/manager. Periodic HTTPS reachability and redirect-host allowlist, not malware certification. Resume requires fresh successful same-destination check under one hour old.",
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "version": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "approvedHosts": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    }
                  },
                  "resume": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved or idempotent receipt"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Permission, CSRF or step-up required"
          },
          "409": {
            "description": "Version, lifecycle, funding or contract conflict"
          }
        }
      }
    },
    "/api/email-preferences": {
      "get": {
        "summary": "Read own optional-email preferences",
        "description": "",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stored scoped data or successful result"
          },
          "400": {
            "description": "Invalid typed input"
          },
          "403": {
            "description": "Role, CSRF or step-up required"
          },
          "409": {
            "description": "Stale version or lifecycle conflict"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "Set own email choices",
        "description": "Optional org query scopes this member only. Global opt-out takes precedence. Auth links and explicitly requested receipts remain mandatory; queued optional messages recheck before delivery.",
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stored scoped data or successful result"
          },
          "400": {
            "description": "Invalid typed input"
          },
          "403": {
            "description": "Role, CSRF or step-up required"
          },
          "409": {
            "description": "Stale version or lifecycle conflict"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "categories": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "boolean"
                    }
                  }
                },
                "required": [
                  "version",
                  "enabled",
                  "categories"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/traffic-quality": {
      "get": {
        "summary": "Read own revenue-quality decisions",
        "description": "Publisher/advertiser see only their own money. scope=admin requires a platform administrator. Raw IP and installation secrets are not exposed.",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stored scoped data or successful result"
          },
          "400": {
            "description": "Invalid typed input"
          },
          "403": {
            "description": "Role, CSRF or step-up required"
          },
          "409": {
            "description": "Stale version or lifecycle conflict"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/display-profiles": {
      "get": {
        "summary": "List versioned fixed slot profiles",
        "description": "",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stored scoped data or successful result"
          },
          "400": {
            "description": "Invalid typed input"
          },
          "403": {
            "description": "Role, CSRF or step-up required"
          },
          "409": {
            "description": "Stale version or lifecycle conflict"
          }
        }
      }
    },
    "/api/auth/restore": {
      "post": {
        "operationId": "post__api_auth_restore",
        "summary": "Restore an opted-in remembered browser after active-session expiry",
        "description": "Exact same-origin POST JSON {}. Requires the separate HttpOnly __Host-didnex_remember proof. The credential is hashed, rotated atomically with audit, retains its initial absolute expiry and never grants fresh step-up. Invalid, revoked or spent proofs return restored=false without overwriting another successful restore cookie.",
        "security": [
          {
            "RememberCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Restored boolean; successful restoration sets session and rotating remember cookies, never raw credentials in JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "restored": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Invalid Origin or Fetch Metadata"
          },
          "429": {
            "description": "Restore request limit"
          }
        }
      }
    },
    "/api/auth/remember-devices/{id}": {
      "delete": {
        "summary": "Revoke one remembered device belonging to the signed-in account",
        "operationId": "delete__api_auth_remember_devices_id",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict or missing prerequisite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attribution or event time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service configuration required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Activation token consumed or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Requires the current session, exact Origin, CSRF and same-origin metadata. A body is not required. Also revokes the linked active session. Foreign IDs disclose no owner information."
      }
    },
    "/api/ops/overview": {
      "get": {
        "summary": "Operational tool: overview",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/ops/no-fill": {
      "get": {
        "summary": "Operational tool: no-fill",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/ops/preflight": {
      "get": {
        "summary": "Operational tool: preflight",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "Operational tool: preflight",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "unitId": {
                    "type": "string"
                  },
                  "deliveryId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "decision": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "scopeType": {
                    "type": "string"
                  },
                  "scopeId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "paymentId": {
                    "type": "string"
                  },
                  "outboxId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "networkLabel": {
                    "type": "string"
                  },
                  "countryLabel": {
                    "type": "string"
                  },
                  "mediaUrl": {
                    "type": "string"
                  },
                  "version": {
                    "type": "number"
                  },
                  "releaseAt": {
                    "type": "number"
                  },
                  "baselineToman": {
                    "type": "number"
                  },
                  "trialToman": {
                    "type": "number"
                  },
                  "trialBps": {
                    "type": "number"
                  },
                  "minSamples": {
                    "type": "number"
                  },
                  "compensationToman": {
                    "type": "number"
                  },
                  "cancel": {
                    "type": "boolean"
                  },
                  "pacing": {
                    "type": "string",
                    "enum": [
                      "asap",
                      "even"
                    ]
                  },
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "hours": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 168
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 23
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ops/pacing": {
      "get": {
        "summary": "Operational tool: pacing",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "Operational tool: pacing",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "unitId": {
                    "type": "string"
                  },
                  "deliveryId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "decision": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "scopeType": {
                    "type": "string"
                  },
                  "scopeId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "paymentId": {
                    "type": "string"
                  },
                  "outboxId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "networkLabel": {
                    "type": "string"
                  },
                  "countryLabel": {
                    "type": "string"
                  },
                  "mediaUrl": {
                    "type": "string"
                  },
                  "version": {
                    "type": "number"
                  },
                  "releaseAt": {
                    "type": "number"
                  },
                  "baselineToman": {
                    "type": "number"
                  },
                  "trialToman": {
                    "type": "number"
                  },
                  "trialBps": {
                    "type": "number"
                  },
                  "minSamples": {
                    "type": "number"
                  },
                  "compensationToman": {
                    "type": "number"
                  },
                  "cancel": {
                    "type": "boolean"
                  },
                  "pacing": {
                    "type": "string",
                    "enum": [
                      "asap",
                      "even"
                    ]
                  },
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "hours": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 168
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 23
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ops/fatigue": {
      "get": {
        "summary": "Operational tool: fatigue",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/ops/money": {
      "get": {
        "summary": "Operational tool: money",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/ops/reserves": {
      "get": {
        "summary": "Operational tool: reserves",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/ops/reserve-policy": {
      "post": {
        "summary": "Operational tool: reserve-policy",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "unitId": {
                    "type": "string"
                  },
                  "deliveryId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "decision": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "scopeType": {
                    "type": "string"
                  },
                  "scopeId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "paymentId": {
                    "type": "string"
                  },
                  "outboxId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "networkLabel": {
                    "type": "string"
                  },
                  "countryLabel": {
                    "type": "string"
                  },
                  "mediaUrl": {
                    "type": "string"
                  },
                  "version": {
                    "type": "number"
                  },
                  "releaseAt": {
                    "type": "number"
                  },
                  "baselineToman": {
                    "type": "number"
                  },
                  "trialToman": {
                    "type": "number"
                  },
                  "trialBps": {
                    "type": "number"
                  },
                  "minSamples": {
                    "type": "number"
                  },
                  "compensationToman": {
                    "type": "number"
                  },
                  "cancel": {
                    "type": "boolean"
                  },
                  "pacing": {
                    "type": "string",
                    "enum": [
                      "asap",
                      "even"
                    ]
                  },
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "hours": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 168
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 23
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ops/sandbox": {
      "get": {
        "summary": "Operational tool: sandbox",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unitId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "Operational tool: sandbox",
        "description": "Authenticated panel with role/ownership checks; verified email according to policy. Mutations require exact Origin and X-Didnex-CSRF. Financial routes require owner/finance; sensitive writes require step-up. Action-specific semantics and limits: OPERATIONS_8_24.md. GET never mutates money.",
        "tags": [
          "Operational tools"
        ],
        "security": [
          {
            "SessionCookie": [],
            "PanelCSRF": []
          }
        ],
        "responses": {
          "200": {
            "description": "Actual scoped report or committed result"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Invalid input"
          },
          "403": {
            "description": "Role/ownership/step-up required"
          },
          "409": {
            "description": "Stale version, duplicate warning, insufficient funds or incompatible state"
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaignId": {
                    "type": "string"
                  },
                  "unitId": {
                    "type": "string"
                  },
                  "deliveryId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "decision": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "scopeType": {
                    "type": "string"
                  },
                  "scopeId": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "paymentId": {
                    "type": "string"
                  },
                  "outboxId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "networkLabel": {
                    "type": "string"
                  },
                  "countryLabel": {
                    "type": "string"
                  },
                  "mediaUrl": {
                    "type": "string"
                  },
                  "version": {
                    "type": "number"
                  },
                  "releaseAt": {
                    "type": "number"
                  },
                  "baselineToman": {
                    "type": "number"
                  },
                  "trialToman": {
                    "type": "number"
                  },
                  "trialBps": {
                    "type": "number"
                  },
                  "minSamples": {
                    "type": "number"
                  },
                  "compensationToman": {
                    "type": "number"
                  },
                  "cancel": {
                    "type": "boolean"
                  },
                  "pacing": {
                    "type": "string",
                    "enum": [
                      "asap",
                      "even"
                    ]
                  },
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "hours": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 168
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 23
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/report-assistant": {
      "get": {
        "summary": "Read own statistical assistance",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "description": "Required for organization-scoped reports. Membership is checked.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 7
            }
          }
        ],
        "description": "Independent session, verified email according to policy, membership and role scope are enforced. Viewer is read-only. No campaign, budget or financial mutation. GET never calls an external model. POST requires session CSRF; an operator-configured HTTPS provider and outbound allowlist are required. Only aggregate own-scope evidence and the bounded question leave the service. Eight generations per user/hour. Sandbox blocks external generation.",
        "responses": {
          "200": {
            "description": "Scoped report, including evidence and optional generation status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "role",
                    "window",
                    "current",
                    "previous",
                    "findings",
                    "provider",
                    "readOnly",
                    "engine"
                  ],
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "advertiser"
                      ]
                    },
                    "window": {
                      "type": "object",
                      "description": "Current and adjacent equal-duration previous windows; Asia/Tehran."
                    },
                    "current": {
                      "type": "object",
                      "description": "Allowlisted aggregate metrics. amountMilli is milli-rial; null is undefined ratio."
                    },
                    "previous": {
                      "type": "object"
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "category",
                          "level",
                          "title",
                          "detail",
                          "action",
                          "evidence"
                        ]
                      }
                    },
                    "provider": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "available": {
                          "type": "boolean"
                        }
                      }
                    },
                    "readOnly": {
                      "const": true
                    },
                    "engine": {
                      "const": "explainable_statistics"
                    },
                    "generation": {
                      "type": "object",
                      "description": "Optional explicit POST result: ready with plain text, or unavailable with statistical evidence retained."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid days, question or browser-supplied snapshot"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CSRF, verified email, membership or role required"
          },
          "405": {
            "description": "Unsupported method"
          },
          "409": {
            "description": "report_ai_not_configured"
          },
          "429": {
            "description": "Generation or panel rate limit"
          }
        }
      },
      "post": {
        "summary": "Explicitly request an AI narrative from own fresh aggregate evidence",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": true,
            "description": "Required for organization-scoped reports. Membership is checked.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 7
            }
          }
        ],
        "description": "Independent session, verified email according to policy, membership and role scope are enforced. Viewer is read-only. No campaign, budget or financial mutation. GET never calls an external model. POST requires session CSRF; an operator-configured HTTPS provider and outbound allowlist are required. Only aggregate own-scope evidence and the bounded question leave the service. Eight generations per user/hour. Sandbox blocks external generation.",
        "responses": {
          "200": {
            "description": "Scoped report, including evidence and optional generation status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "role",
                    "window",
                    "current",
                    "previous",
                    "findings",
                    "provider",
                    "readOnly",
                    "engine"
                  ],
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "advertiser"
                      ]
                    },
                    "window": {
                      "type": "object",
                      "description": "Current and adjacent equal-duration previous windows; Asia/Tehran."
                    },
                    "current": {
                      "type": "object",
                      "description": "Allowlisted aggregate metrics. amountMilli is milli-rial; null is undefined ratio."
                    },
                    "previous": {
                      "type": "object"
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "category",
                          "level",
                          "title",
                          "detail",
                          "action",
                          "evidence"
                        ]
                      }
                    },
                    "provider": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "available": {
                          "type": "boolean"
                        }
                      }
                    },
                    "readOnly": {
                      "const": true
                    },
                    "engine": {
                      "const": "explainable_statistics"
                    },
                    "generation": {
                      "type": "object",
                      "description": "Optional explicit POST result: ready with plain text, or unavailable with statistical evidence retained."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid days, question or browser-supplied snapshot"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CSRF, verified email, membership or role required"
          },
          "405": {
            "description": "Unsupported method"
          },
          "409": {
            "description": "report_ai_not_configured"
          },
          "429": {
            "description": "Generation or panel rate limit"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 600
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Organization": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "advertiser",
              "publisher"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          }
        },
        "required": [
          "type",
          "name"
        ],
        "additionalProperties": false
      },
      "Campaign": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "brand": {
            "type": "string",
            "minLength": 2,
            "maxLength": 60
          },
          "model": {
            "type": "string",
            "enum": [
              "CPC",
              "CPM"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "banner",
              "adaptive_banner",
              "native",
              "native_video",
              "video",
              "interstitial",
              "rewarded",
              "rewarded_interstitial",
              "app_open",
              "playable",
              "audio",
              "carousel",
              "poll"
            ]
          },
          "budget": {
            "type": "integer",
            "minimum": 10000,
            "description": "Toman total"
          },
          "daily": {
            "type": "integer",
            "minimum": 1000,
            "description": "Toman daily cap"
          },
          "rate": {
            "type": "integer",
            "minimum": 1,
            "description": "Toman per click or per thousand impressions"
          },
          "country": {
            "type": "string",
            "enum": [
              "IR",
              "TR",
              "AE",
              "ALL"
            ],
            "default": "IR"
          },
          "device": {
            "type": "string",
            "enum": [
              "all",
              "android",
              "ios",
              "web"
            ],
            "default": "all",
            "deprecated": true,
            "description": "Legacy single target; retained when targeting is omitted. A supplied targeting object replaces this filter."
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 3
          },
          "message": {
            "type": "string",
            "minLength": 2,
            "maxLength": 70
          },
          "destination": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "creativeId": {
            "type": "string"
          },
          "startsAt": {
            "type": "integer",
            "description": "Unix milliseconds; optional = now"
          },
          "endsAt": {
            "type": "integer",
            "description": "Unix milliseconds"
          },
          "category": {
            "type": "string",
            "enum": [
              "general",
              "shopping",
              "technology",
              "education",
              "games",
              "entertainment",
              "travel",
              "food",
              "services"
            ],
            "default": "general"
          },
          "targeting": {
            "$ref": "#/components/schemas/DeviceTargeting"
          }
        },
        "required": [
          "name",
          "brand",
          "model",
          "format",
          "budget",
          "daily",
          "rate",
          "message",
          "destination",
          "creativeId",
          "endsAt"
        ],
        "additionalProperties": false
      },
      "CampaignUpdate": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "budget": {
            "type": "integer"
          },
          "daily": {
            "type": "integer"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Payment": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "zarinpal",
              "zibal"
            ],
            "description": "Optional: configured enabled default gateway; immutable for this idempotency key"
          },
          "amount": {
            "type": "integer",
            "minimum": 10000,
            "maximum": 100000000,
            "description": "Toman; actual deposit range may be narrower per operator settings; server multiplies by 10 for IRR"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 12,
            "maxLength": 100
          },
          "quoteToken": {
            "type": "string",
            "description": "توکن پیش‌فاکتور تأییدشده، الزامی هنگام فعال بودن مالیات"
          }
        },
        "required": [
          "amount",
          "idempotencyKey"
        ],
        "additionalProperties": false
      },
      "Conversion": {
        "type": "object",
        "properties": {
          "clickId": {
            "type": "string"
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "maxLength": 60,
            "default": "conversion"
          },
          "valueRial": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          }
        },
        "required": [
          "clickId",
          "externalId"
        ],
        "additionalProperties": false
      },
      "Invite": {
        "type": "object",
        "properties": {
          "recipientId": {
            "type": "string",
            "description": "Canonical recipient account ID copied from My Account; required for unverified emails"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Legacy trusted verified accounts only"
          },
          "role": {
            "type": "string",
            "enum": [
              "manager",
              "finance",
              "viewer"
            ]
          }
        },
        "required": [
          "role"
        ],
        "additionalProperties": false
      },
      "Ticket": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "support",
              "privacy"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 3,
            "maxLength": 100
          },
          "message": {
            "type": "string",
            "minLength": 10,
            "maxLength": 3000
          }
        },
        "required": [
          "type",
          "subject",
          "message"
        ],
        "additionalProperties": false
      },
      "CommerceOrder": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Strictly increasing per order; identical retries reuse version"
          },
          "clickId": {
            "type": "string",
            "description": "Optional; attributed valid click owned by same advertiser"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "cancelled",
              "refunded"
            ]
          },
          "grossRial": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "refundRial": {
            "type": "integer",
            "minimum": 0,
            "default": 0,
            "description": "Cumulative; cannot decrease"
          },
          "costRial": {
            "type": "integer",
            "minimum": 0,
            "description": "Optional actual remaining contribution costs after refunds"
          },
          "paidAt": {
            "type": "integer",
            "description": "Actual first payment time, Unix milliseconds; immutable once set"
          }
        },
        "required": [
          "externalId",
          "version",
          "status",
          "grossRial"
        ],
        "additionalProperties": false
      },
      "BusinessEvent": {
        "type": "object",
        "properties": {
          "clickId": {
            "type": "string"
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "kind": {
            "type": "string",
            "enum": [
              "registration",
              "activation",
              "retained_d7"
            ]
          }
        },
        "required": [
          "clickId",
          "externalId",
          "kind"
        ],
        "additionalProperties": false
      },
      "OptimizerRule": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "metric": {
            "type": "string",
            "enum": [
              "max_cpa",
              "min_roas",
              "max_spend"
            ]
          },
          "threshold": {
            "type": "integer",
            "minimum": 1,
            "description": "IRR for CPA/spend; ratio multiplied by 10000 for ROAS"
          },
          "minClicks": {
            "type": "integer",
            "minimum": 30,
            "maximum": 1000000,
            "default": 30
          },
          "lookbackHours": {
            "type": "integer",
            "minimum": 24,
            "maximum": 720,
            "default": 168
          },
          "delayHours": {
            "type": "integer",
            "minimum": 1,
            "maximum": 168,
            "default": 24
          },
          "action": {
            "type": "string",
            "enum": [
              "notify",
              "pause"
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "campaignId",
          "name",
          "metric",
          "threshold",
          "action"
        ],
        "additionalProperties": false
      },
      "CreativeVariant": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string"
          },
          "creativeId": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "maxLength": 70
          },
          "cta": {
            "type": "string",
            "minLength": 2,
            "maxLength": 30,
            "default": "بیشتر بدانید"
          },
          "weight": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 1
          }
        },
        "required": [
          "campaignId",
          "creativeId",
          "title"
        ],
        "additionalProperties": false
      },
      "MarketDeal": {
        "type": "object",
        "properties": {
          "listingId": {
            "type": "string"
          },
          "campaignId": {
            "type": "string"
          },
          "rate": {
            "type": "integer",
            "minimum": 1,
            "description": "Toman; cannot be less than listing minimum"
          },
          "budget": {
            "type": "integer",
            "minimum": 1000,
            "description": "Toman; capped by campaign budget"
          },
          "startsAt": {
            "type": "integer",
            "description": "Unix milliseconds; defaults to now"
          },
          "endsAt": {
            "type": "integer",
            "description": "Cannot exceed campaign end"
          }
        },
        "required": [
          "listingId",
          "campaignId",
          "rate",
          "budget",
          "endsAt"
        ],
        "additionalProperties": false
      },
      "Experiment": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 3,
            "maxLength": 80
          },
          "targetId": {
            "type": "string",
            "description": "Owned campaign for advertiser, owned unit for publisher"
          },
          "metric": {
            "type": "string",
            "enum": [
              "purchase",
              "activation",
              "retained_d7"
            ]
          },
          "minPerArm": {
            "type": "integer",
            "minimum": 100,
            "maximum": 1000000,
            "default": 500
          },
          "observationHours": {
            "type": "integer",
            "minimum": 1,
            "maximum": 720,
            "description": "Default 24; retained_d7 requires at least 168"
          }
        },
        "required": [
          "name",
          "targetId",
          "metric"
        ],
        "additionalProperties": false
      },
      "ExperimentEnrollment": {
        "type": "object",
        "properties": {
          "experimentId": {
            "type": "string"
          },
          "subjectToken": {
            "type": "string",
            "minLength": 16,
            "maxLength": 128,
            "description": "Opaque random stable token scoped to experiment; no raw account/contact identifiers"
          },
          "consent": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "experimentId",
          "subjectToken",
          "consent"
        ],
        "additionalProperties": false
      },
      "ExperimentOutcome": {
        "type": "object",
        "properties": {
          "enrollmentToken": {
            "type": "string"
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "valueRial": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000,
            "default": 0
          },
          "observedAt": {
            "type": "integer",
            "description": "Actual event time within subject observation window; default receive time"
          }
        },
        "required": [
          "enrollmentToken",
          "externalId"
        ],
        "additionalProperties": false
      },
      "AnalyticsRow": {
        "type": "object",
        "properties": {
          "impressions": {
            "type": "integer",
            "minimum": 0
          },
          "clicks": {
            "type": "integer",
            "minimum": 0
          },
          "amountMilli": {
            "type": "integer",
            "minimum": 0
          },
          "publisherRevenueMilli": {
            "type": "integer",
            "minimum": 0
          },
          "networkFeeMilli": {
            "type": "integer",
            "minimum": 0
          },
          "requests": {
            "type": [
              "integer",
              "null"
            ]
          },
          "filled": {
            "type": [
              "integer",
              "null"
            ]
          },
          "conversions": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ctr": {
            "type": [
              "number",
              "null"
            ]
          },
          "ecpmMilli": {
            "type": [
              "number",
              "null"
            ]
          },
          "effectiveCpcMilli": {
            "type": [
              "number",
              "null"
            ]
          },
          "fillRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "day": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "banner",
              "adaptive_banner",
              "native",
              "native_video",
              "video",
              "interstitial",
              "rewarded",
              "rewarded_interstitial",
              "app_open",
              "playable",
              "audio",
              "carousel",
              "poll"
            ]
          },
          "device": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "android",
              "ios",
              "windows",
              "macos",
              "linux",
              "other",
              "unknown"
            ]
          },
          "formFactor": {
            "type": "string",
            "enum": [
              "mobile",
              "tablet",
              "desktop",
              "unknown"
            ]
          },
          "inventoryType": {
            "type": "string",
            "enum": [
              "app",
              "site",
              "unknown"
            ]
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "AnalyticsReport": {
        "type": "object",
        "properties": {
          "impressions": {
            "type": "integer",
            "minimum": 0
          },
          "clicks": {
            "type": "integer",
            "minimum": 0
          },
          "amountMilli": {
            "type": "integer",
            "minimum": 0
          },
          "publisherRevenueMilli": {
            "type": "integer",
            "minimum": 0
          },
          "networkFeeMilli": {
            "type": "integer",
            "minimum": 0
          },
          "requests": {
            "type": [
              "integer",
              "null"
            ]
          },
          "filled": {
            "type": [
              "integer",
              "null"
            ]
          },
          "conversions": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ctr": {
            "type": [
              "number",
              "null"
            ]
          },
          "ecpmMilli": {
            "type": [
              "number",
              "null"
            ]
          },
          "effectiveCpcMilli": {
            "type": [
              "number",
              "null"
            ]
          },
          "fillRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90
          },
          "since": {
            "type": "integer"
          },
          "asOf": {
            "type": "integer"
          },
          "timezone": {
            "const": "Asia/Tehran"
          },
          "partialToday": {
            "const": true,
            "type": "boolean"
          },
          "hasData": {
            "type": "boolean"
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "byFormat": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "byDevice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "leaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "noFillReasons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              },
              "required": [
                "reason",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "videoFunnel": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "start",
                    "firstQuartile",
                    "midpoint",
                    "thirdQuartile",
                    "complete"
                  ]
                },
                "count": {
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "rewards": {
            "type": "object",
            "properties": {
              "verified": {
                "type": "integer"
              },
              "applied": {
                "type": "integer"
              }
            },
            "required": [
              "verified",
              "applied"
            ],
            "additionalProperties": false
          },
          "byPlatform": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "byFormFactor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "byInventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          }
        },
        "required": [
          "impressions",
          "clicks",
          "amountMilli",
          "days",
          "since",
          "asOf",
          "timezone",
          "daily"
        ],
        "additionalProperties": false
      },
      "AccountProfile": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "phone": {
            "type": "string",
            "description": "Optional normalized E.164 contact number; not SMS verified"
          },
          "phoneVerified": {
            "const": false,
            "type": "boolean"
          },
          "intent": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "advertiser",
              "publisher",
              null
            ]
          },
          "completed": {
            "type": "boolean"
          },
          "completedAt": {
            "type": [
              "integer",
              "null"
            ]
          },
          "updatedAt": {
            "type": [
              "integer",
              "null"
            ]
          },
          "provider": {
            "const": "password"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "emailVerified": {
            "type": "boolean"
          }
        },
        "required": [
          "displayName",
          "phone",
          "phoneVerified",
          "completed",
          "provider",
          "email"
        ],
        "additionalProperties": false
      },
      "AccountUpdate": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "intent": {
            "type": "string",
            "enum": [
              "advertiser",
              "publisher"
            ]
          }
        },
        "required": [
          "displayName",
          "intent"
        ],
        "additionalProperties": false
      },
      "AccountRegistration": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "intent": {
            "type": "string",
            "enum": [
              "advertiser",
              "publisher"
            ]
          },
          "organizationName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          }
        },
        "required": [
          "displayName",
          "intent",
          "organizationName"
        ],
        "additionalProperties": false
      },
      "DeviceTargeting": {
        "type": "object",
        "properties": {
          "platforms": {
            "type": "array",
            "uniqueItems": true,
            "maxItems": 7,
            "items": {
              "type": "string",
              "enum": [
                "android",
                "ios",
                "windows",
                "macos",
                "linux",
                "other",
                "unknown"
              ]
            }
          },
          "formFactors": {
            "type": "array",
            "uniqueItems": true,
            "maxItems": 4,
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "tablet",
                "desktop",
                "unknown"
              ]
            }
          },
          "inventoryTypes": {
            "type": "array",
            "uniqueItems": true,
            "maxItems": 2,
            "items": {
              "type": "string",
              "enum": [
                "app",
                "site"
              ]
            }
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "TargetingPreview": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "android",
              "ios",
              "windows",
              "macos",
              "linux",
              "other",
              "unknown"
            ]
          },
          "formFactor": {
            "type": "string",
            "enum": [
              "mobile",
              "tablet",
              "desktop",
              "unknown"
            ]
          },
          "inventoryType": {
            "type": "string",
            "enum": [
              "app",
              "site"
            ]
          },
          "targeting": {
            "$ref": "#/components/schemas/DeviceTargeting"
          }
        },
        "required": [
          "platform",
          "formFactor",
          "inventoryType"
        ],
        "additionalProperties": false
      },
      "PasswordRegister": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128,
            "description": "NFC normalized; administrator minimum 8–64 from /api/auth/config; 8–128 Unicode code points, <=512 UTF-8 bytes; do not trim spaces"
          },
          "displayName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "intent": {
            "type": "string",
            "enum": [
              "advertiser",
              "publisher"
            ]
          },
          "organizationName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "remember": {
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "password",
          "displayName",
          "intent",
          "organizationName"
        ],
        "additionalProperties": false
      },
      "PasswordLogin": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "maxLength": 128
          },
          "remember": {
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "additionalProperties": false
      },
      "PasswordActivation": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128,
            "description": "NFC normalized; administrator minimum 8–64 from /api/auth/config; 8–128 Unicode code points, <=512 UTF-8 bytes; do not trim spaces"
          },
          "displayName": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          }
        },
        "required": [
          "token",
          "password",
          "displayName"
        ],
        "additionalProperties": false
      },
      "PasswordChange": {
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string",
            "maxLength": 128
          },
          "newPassword": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128,
            "description": "NFC normalized; administrator minimum 8–64 from /api/auth/config; 8–128 Unicode code points, <=512 UTF-8 bytes; do not trim spaces"
          }
        },
        "required": [
          "currentPassword",
          "newPassword"
        ],
        "additionalProperties": false
      },
      "AuthResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "orgId": {
            "type": "string"
          },
          "signin": {
            "type": "string"
          },
          "current": {
            "type": "boolean"
          },
          "verificationRequired": {
            "type": "boolean"
          },
          "emailQueued": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": false
      },
      "SessionInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "device_label": {
            "type": "string"
          },
          "created_at": {
            "type": "integer"
          },
          "last_seen_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "current": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "device_label",
          "created_at",
          "last_seen_at",
          "expires_at",
          "current"
        ],
        "additionalProperties": false
      },
      "SessionList": {
        "type": "object",
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionInfo"
            }
          }
        },
        "required": [
          "sessions"
        ],
        "additionalProperties": false
      },
      "AuthConfig": {
        "type": "object",
        "properties": {
          "provider": {
            "const": "password"
          },
          "passwordMinLength": {
            "type": "integer",
            "minimum": 8,
            "maximum": 64
          },
          "passwordMaxLength": {
            "const": 128
          },
          "recoveryMethod": {
            "const": "email"
          },
          "emailDelivery": {
            "type": "boolean"
          },
          "mfa": {
            "const": "totp"
          },
          "emailVerificationRequired": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "provider",
          "passwordMinLength",
          "passwordMaxLength",
          "recoveryMethod",
          "emailDelivery"
        ],
        "additionalProperties": false
      },
      "SessionUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          },
          "sessionId": {
            "type": "string"
          },
          "authVersion": {
            "type": "integer"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "verificationRequired": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "admin",
          "sessionId",
          "authVersion",
          "emailVerified"
        ],
        "additionalProperties": false
      },
      "MeResponse": {
        "type": "object",
        "properties": {
          "user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SessionUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "account": {
            "$ref": "#/components/schemas/AccountProfile"
          },
          "orgs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "csrf": {
            "type": "string"
          },
          "provider": {
            "const": "password"
          },
          "signin": {
            "type": "string"
          },
          "register": {
            "type": "string"
          },
          "recover": {
            "type": "string"
          }
        },
        "required": [
          "user"
        ],
        "additionalProperties": false
      },
      "MfaChallenge": {
        "type": "object",
        "properties": {
          "mfaRequired": {
            "const": true
          },
          "challenge": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          }
        },
        "required": [
          "mfaRequired",
          "challenge"
        ],
        "additionalProperties": false
      },
      "MfaLogin": {
        "type": "object",
        "properties": {
          "challenge": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "code": {
            "type": "string",
            "pattern": "^[0-9]{6}$"
          },
          "backupCode": {
            "type": "string",
            "description": "One-use private backup code; alternative to TOTP"
          }
        },
        "required": [
          "challenge"
        ],
        "additionalProperties": false
      },
      "StepUp": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "format": "password"
          },
          "code": {
            "type": "string",
            "pattern": "^[0-9]{6}$"
          },
          "backupCode": {
            "type": "string",
            "description": "One-use private backup code; alternative to TOTP"
          }
        },
        "required": [
          "password"
        ],
        "additionalProperties": false
      },
      "CampaignControls": {
        "type": "object",
        "properties": {
          "pacing": {
            "type": "string",
            "enum": [
              "asap",
              "even"
            ]
          },
          "timezone": {
            "const": "Asia/Tehran"
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "minItems": 1,
            "maxItems": 7
          },
          "hours": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23
            },
            "minItems": 1,
            "maxItems": 24
          },
          "includeTopics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "excludeTopics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 30
          },
          "deepLink": {
            "type": "string",
            "description": "Optional HTTPS app/universal link on the approved campaign destination hostname"
          },
          "fallbackUrl": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "catalogId": {
            "type": "string",
            "description": "Optional own image-ad catalog"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "CatalogProduct": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "maxLength": 70
          },
          "imageUrl": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "priceRial": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "inStock": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "title",
          "imageUrl",
          "url",
          "priceRial",
          "inStock"
        ],
        "additionalProperties": false
      },
      "CatalogFeed": {
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogProduct"
            },
            "maxItems": 500
          }
        },
        "required": [
          "products"
        ],
        "additionalProperties": false
      },
      "AlertRule": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "metric": {
            "type": "string",
            "enum": [
              "low_balance",
              "no_fill_rate",
              "sdk_errors",
              "budget_remaining",
              "revenue_drop"
            ]
          },
          "threshold": {
            "type": "integer",
            "minimum": 0
          },
          "windowMinutes": {
            "type": "integer",
            "minimum": 15,
            "maximum": 1440,
            "default": 60
          },
          "cooldownMinutes": {
            "type": "integer",
            "minimum": 15,
            "maximum": 10080,
            "default": 60
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "metric",
          "threshold"
        ],
        "additionalProperties": false
      },
      "StudioScene": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "maxLength": 70
          },
          "subtitle": {
            "type": "string",
            "maxLength": 140
          },
          "cta": {
            "type": "string",
            "maxLength": 30
          },
          "durationMs": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 15000
          },
          "background": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "foreground": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "accent": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "layout": {
            "type": "string",
            "enum": [
              "spotlight",
              "minimal",
              "split"
            ]
          },
          "animation": {
            "type": "string",
            "enum": [
              "fade",
              "slide",
              "zoom",
              "none"
            ]
          },
          "imageId": {
            "type": "string",
            "description": "Optional own image creative ID"
          },
          "fit": {
            "type": "string",
            "enum": [
              "contain",
              "cover"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "durationMs",
          "background",
          "foreground",
          "accent",
          "layout",
          "animation"
        ],
        "additionalProperties": false
      },
      "StudioDocument": {
        "type": "object",
        "properties": {
          "version": {
            "const": 1
          },
          "ratio": {
            "type": "string",
            "enum": [
              "portrait",
              "square",
              "landscape",
              "feed",
              "banner"
            ]
          },
          "brandName": {
            "type": "string",
            "maxLength": 60
          },
          "logoId": {
            "type": "string",
            "description": "Optional own image creative ID"
          },
          "scenes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StudioScene"
            },
            "minItems": 1,
            "maxItems": 8
          }
        },
        "required": [
          "version",
          "ratio",
          "scenes"
        ],
        "additionalProperties": false
      },
      "StudioProjectInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "document": {
            "$ref": "#/components/schemas/StudioDocument"
          }
        },
        "required": [
          "name",
          "document"
        ],
        "additionalProperties": false
      },
      "StudioProjectUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "document": {
            "$ref": "#/components/schemas/StudioDocument"
          }
        },
        "required": [
          "name",
          "version",
          "document"
        ],
        "additionalProperties": false
      },
      "StudioProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "document": {
            "$ref": "#/components/schemas/StudioDocument"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "updated_at": {
            "type": "integer"
          },
          "archived_at": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "document",
          "version"
        ],
        "additionalProperties": false
      },
      "StudioBrand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 60
          },
          "colors": {
            "type": "object",
            "properties": {
              "background": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "foreground": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "accent": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              }
            },
            "required": [
              "background",
              "foreground",
              "accent"
            ],
            "additionalProperties": false
          },
          "logoId": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "description": "0 creates a kit; later edits require the current version"
          }
        },
        "required": [
          "name",
          "colors",
          "version"
        ],
        "additionalProperties": false
      },
      "StudioExportStart": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "video/mp4",
              "video/webm"
            ]
          },
          "width": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1920
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1920
          },
          "durationMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 60000
          }
        },
        "required": [
          "format",
          "width",
          "height",
          "durationMs"
        ],
        "additionalProperties": false
      },
      "StudioExportUpdate": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "rendered",
              "uploaded",
              "failed",
              "cancelled"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "video/mp4",
              "video/webm"
            ]
          },
          "creativeId": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20971520
          },
          "elapsedMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 300000
          },
          "errorCode": {
            "type": "string",
            "pattern": "^[a-z0-9_]{1,80}$"
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "TrackingParameters": {
        "type": "object",
        "properties": {
          "utm_source": {
            "type": "string",
            "maxLength": 160,
            "description": "Optional {campaign_id}, {creative_id}, {placement_id} macros"
          },
          "utm_medium": {
            "type": "string",
            "maxLength": 160,
            "description": "Optional {campaign_id}, {creative_id}, {placement_id} macros"
          },
          "utm_campaign": {
            "type": "string",
            "maxLength": 160,
            "description": "Optional {campaign_id}, {creative_id}, {placement_id} macros"
          },
          "utm_content": {
            "type": "string",
            "maxLength": 160,
            "description": "Optional {campaign_id}, {creative_id}, {placement_id} macros"
          },
          "utm_term": {
            "type": "string",
            "maxLength": 160,
            "description": "Optional {campaign_id}, {creative_id}, {placement_id} macros"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "LocationRule": {
        "type": "object",
        "properties": {
          "includeCountries": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "excludeCountries": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "includeRegions": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "excludeRegions": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "includeCities": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "excludeCities": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "radius": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "km": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 1000
                  }
                },
                "required": [
                  "latitude",
                  "longitude",
                  "km"
                ],
                "additionalProperties": false
              }
            ]
          },
          "unknown": {
            "type": "string",
            "enum": [
              "exclude",
              "allow"
            ],
            "default": "exclude"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "AdaptiveMediaSource": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "mime": {
            "const": "video/mp4"
          },
          "quality": {
            "type": "string",
            "enum": [
              "360p",
              "540p",
              "720p"
            ]
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "bitrate": {
            "type": "integer"
          },
          "bytes": {
            "type": "integer"
          }
        },
        "required": [
          "url",
          "mime",
          "quality",
          "width",
          "height",
          "bitrate",
          "bytes"
        ]
      },
      "ReportScheduleInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "cadence": {
            "type": "string",
            "enum": [
              "daily",
              "weekly"
            ]
          },
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "impressions",
                "clicks",
                "amountMilli",
                "ctr",
                "requests",
                "filled",
                "fillRate",
                "conversions",
                "customers"
              ]
            },
            "minItems": 1,
            "maxItems": 9,
            "uniqueItems": true
          },
          "recipientIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 10,
            "uniqueItems": true
          },
          "confirmEmailDelivery": {
            "const": true
          }
        },
        "required": [
          "name",
          "cadence",
          "days",
          "recipientIds",
          "confirmEmailDelivery"
        ]
      },
      "StudioComment": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "timeMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 60000
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "message": {
            "type": "string",
            "minLength": 2,
            "maxLength": 1500
          },
          "assigneeId": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "timeMs",
          "x",
          "y",
          "message"
        ]
      },
      "BudgetPatch": {
        "type": "object",
        "properties": {
          "cap": {
            "type": "integer",
            "minimum": 1000
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "cap",
          "version",
          "enabled"
        ]
      },
      "ReportInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100
          },
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "impressions",
                "clicks",
                "amountMilli",
                "ctr",
                "requests",
                "filled",
                "fillRate",
                "conversions",
                "customers"
              ]
            },
            "minItems": 1,
            "maxItems": 9,
            "uniqueItems": true
          }
        },
        "required": [
          "name",
          "days"
        ]
      },
      "FinancialApprovalPending": {
        "type": "object",
        "properties": {
          "approvalRequired": {
            "const": true
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "approvalRequired",
          "id",
          "message"
        ]
      },
      "BudgetInput": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "organization",
              "brand",
              "team"
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 60
          },
          "cap": {
            "type": "integer",
            "minimum": 1000,
            "description": "Toman, not milli-rial."
          }
        },
        "required": [
          "scope",
          "cap"
        ]
      },
      "AppleImpression": {
        "type": "object",
        "properties": {
          "compactJWS": {
            "type": "string",
            "description": "Signed network ES256 impression. Never contains the private key."
          },
          "impressionId": {
            "type": "string",
            "format": "uuid"
          },
          "advertisedItemId": {
            "type": "string"
          },
          "networkIdentifier": {
            "type": "string"
          },
          "expiresAt": {
            "type": "integer"
          }
        },
        "required": [
          "compactJWS",
          "expiresAt"
        ]
      },
      "CustomerEvent": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "minLength": 8,
            "maxLength": 100
          },
          "subjectId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{16,128}$",
            "description": "Random opaque customer ID; never email, phone, raw device ID or PII."
          },
          "kind": {
            "type": "string",
            "enum": [
              "install",
              "session_start",
              "view",
              "add_to_cart",
              "checkout",
              "purchase",
              "refund"
            ]
          },
          "orderId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{16,128}$",
            "description": "Required for purchase/refund."
          },
          "campaignId": {
            "type": "string"
          },
          "valueRial": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "occurredAt": {
            "type": "integer",
            "description": "Unix ms: last 93 days through five minutes ahead."
          },
          "consent": {
            "const": true
          }
        },
        "required": [
          "externalId",
          "subjectId",
          "kind",
          "occurredAt",
          "consent"
        ]
      },
      "FunnelInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "install",
                "session_start",
                "view",
                "add_to_cart",
                "checkout",
                "purchase"
              ]
            },
            "minItems": 2,
            "maxItems": 6,
            "uniqueItems": true
          },
          "windowHours": {
            "type": "integer",
            "minimum": 1,
            "maximum": 720
          }
        },
        "required": [
          "name",
          "steps",
          "windowHours"
        ]
      },
      "StudioReview": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "decision": {
            "type": "string",
            "enum": [
              "approved",
              "changes_requested"
            ]
          },
          "message": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "version",
          "decision"
        ]
      },
      "ForecastInput": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "enum": [
              "IR",
              "TR",
              "AE",
              "ALL"
            ]
          },
          "targeting": {
            "$ref": "#/components/schemas/DeviceTargeting"
          },
          "location": {
            "type": "object"
          },
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90
          },
          "model": {
            "type": "string",
            "enum": [
              "CPM",
              "CPC"
            ]
          },
          "rateToman": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000000
          },
          "auctionSharePercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "assumedViewRatePercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "assumedCtrPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "format"
        ]
      },
      "PlayableInput": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string",
            "enum": [
              "tap_target",
              "memory_pairs",
              "color_match",
              "quick_math",
              "number_order",
              "sequence_memory"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "maxLength": 70
          },
          "instruction": {
            "type": "string",
            "minLength": 2,
            "maxLength": 140
          },
          "durationSeconds": {
            "type": "integer",
            "minimum": 5,
            "maximum": 30
          },
          "target": {
            "type": "integer",
            "minimum": 2,
            "maximum": 20
          },
          "background": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "accent": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          }
        },
        "required": [
          "template",
          "title",
          "instruction"
        ]
      },
      "SlotContract": {
        "type": "object",
        "properties": {
          "version": {
            "const": 1
          },
          "profile": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "mediaAspectRatio": {
            "type": "number"
          },
          "footerDp": {
            "type": "integer"
          },
          "fit": {
            "const": "contain"
          },
          "emptyBehavior": {
            "const": "collapse"
          },
          "geometrySource": {
            "const": "placement"
          }
        }
      }
    },
    "securitySchemes": {
      "SessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-didnex_session",
        "description": "Independent opaque server session. Never use hosting identity headers. Default 12h absolute/2h idle; remember 30d/1d idle. New-session lifetimes are configurable by the operator."
      },
      "PanelCSRF": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Didnex-CSRF",
        "description": "Session-bound daily CSRF from /api/me, independent cookie and exact Origin required."
      },
      "PublisherKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Publisher server-only md_ key with serve scope; required only for the legacy server app request and secure rewards; never embed in apps."
      },
      "AdvertiserKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Advertiser server-only md_ key with conversions scope."
      },
      "DeliverySignature": {
        "type": "apiKey",
        "in": "query",
        "name": "sig",
        "description": "Opaque HMAC from issued delivery; bound to delivery ID and expiry."
      },
      "JobsKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Operator JOBS_SECRET; fixed maintenance operations only"
      },
      "RememberCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-didnex_remember",
        "description": "HttpOnly Secure rotating browser credential; never embed in code or store in localStorage."
      }
    }
  }
}
