{
  "openapi": "3.1.0",
  "info": {
    "title": "Pollarix API",
    "description": "Reference for the documented subset of the Pollarix API. Operations marked deprecated are retained for reference and are outside the current public API.",
    "version": "1.0.0"
  },
  "paths": {
    "/auth/access-token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Obtain an access token using API key and secret",
        "description": "Obtain an OAuth2 access token by providing an `apiKey`, `apiSecret`, and `email`.\nThis endpoint is useful for programmatic access to the API, allowing integration with external services.",
        "operationId": "login_for_access_token_auth_access_token_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Oauth2Login"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/survey/{survey_id}": {
      "get": {
        "tags": [
          "Survey"
        ],
        "summary": "Get a survey by its ID",
        "description": "Retrieve a specific survey by its unique **survey_id**.\n\n**What you get**:\n- Detailed survey configuration and content.\n- Associated theme information if available.\n\nThis is useful for viewing the full definition of a survey, including questions and layout.",
        "operationId": "get_by_id_survey__survey_id__get",
        "parameters": [
          {
            "name": "survey_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Survey Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SurveyRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/survey/department/{department_id}": {
      "get": {
        "tags": [
          "Survey"
        ],
        "summary": "List surveys by department ID",
        "description": "List all surveys associated with a specific department.\n\n**Key Features**:\n- Filter surveys by department.\n- Optionally include full survey content.\n- Useful for displaying all surveys available to users within a department.\n\nIf `with_content=True`, each survey will include its full content. If not, only minimal information (IDs, titles, timestamps) is returned.",
        "operationId": "list_by_department_id_survey_department__department_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "department_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Department Id"
            }
          },
          {
            "name": "with_content",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "With Content"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SurveyRead"
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MinimalSurveyRead"
                      }
                    }
                  ],
                  "title": "Response List By Department Id Survey Department  Department Id  Get"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/survey-response/{survey_response_id}": {
      "get": {
        "tags": [
          "Survey Response"
        ],
        "summary": "Get a survey response by ID",
        "description": "Retrieve a single **survey response** by its unique ID.\n\n**Key Features**:\n- Optionally include the associated contact information.\n- Populate dynamic parameters for enriched context.\n- Retrieve extended data to show detailed question and answer information.\n\n**Use Cases**:\n- Displaying the complete details of a particular survey response.\n- Debugging or auditing a single response's data and associated contact.",
        "operationId": "get_by_id_survey_response__survey_response_id__get",
        "parameters": [
          {
            "name": "survey_response_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Survey Response Id"
            }
          },
          {
            "name": "withContact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Withcontact"
            }
          },
          {
            "name": "populateDynamicParameters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Populatedynamicparameters"
            }
          },
          {
            "name": "extendedData",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "\n        If true will show extended information about questions and answers\n    ",
              "default": false,
              "title": "Extendeddata"
            },
            "description": "\n        If true will show extended information about questions and answers\n    "
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SurveyResponseRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/survey-response/survey/{survey_id}": {
      "get": {
        "tags": [
          "Survey Response"
        ],
        "summary": "List responses by survey ID",
        "description": "Retrieve a list of minimal survey responses associated with a particular survey.\n\n**What is Minimal?**\n- Returns a lighter response object containing key fields like `id`, `status`, `created_at`, and `updated_at`.\n- Useful for listing responses without loading heavy content.\n\n**Use Cases**:\n- Displaying all responses for a given survey to department users.\n- Providing a dashboard of recent responses.",
        "operationId": "list_by_survey_id_survey_response_survey__survey_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "survey_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Survey Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MinimalSurveyResponseRead"
                  },
                  "title": "Response List By Survey Id Survey Response Survey  Survey Id  Get"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/survey-response/collector/{collector_id}": {
      "get": {
        "tags": [
          "Survey Response"
        ],
        "summary": "List responses by collector ID with filters",
        "description": "Retrieve and filter survey responses by a specific collector, with optional filters such as status, score, dynamic parameters, date range, or contact details.\n\n**Key Filters**:\n- **Status**: Filter responses by completion or other statuses.\n- **Score**: Filter by normalized score using comparison operators.\n- **Dynamic Parameters**: Match responses based on custom dynamic parameters.\n- **Date Range**: Retrieve responses created within a specified date range.\n- **Contact Search**: Search for responses by contact name, email, or phone.\n\n**Use Cases**:\n- Analyzing responses collected through a specific channel (collector).\n- Generating reports or analytics based on filters.",
        "operationId": "list_by_collector_id_survey_response_collector__collector_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SurveyResponseStatus"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "scoreValue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "title": "Scorevalue"
            }
          },
          {
            "name": "scoreOperator",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Scoreoperator"
            }
          },
          {
            "name": "dynamicParameterKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Dynamicparameterkey"
            }
          },
          {
            "name": "dynamicParameterValue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Dynamicparametervalue"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "title": "Startdate"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "title": "Enddate"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Contact"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMaximum": 2147483647,
              "exclusiveMinimum": 0,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Pagesize"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_MinimalSurveyResponseRead_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/collector/": {
      "post": {
        "tags": [
          "Collector"
        ],
        "summary": "Create a new collector",
        "description": "Create a new collector that will distribute a given survey to contacts through a specified channel (e.g., Email, SMS, or Widget).\n\n**Key Details**:\n- Provide the `survey_id` that this collector is associated with.\n- Define the type of collector (`EMAIL`, `SMS`, or `WIDGET`).\n- Optionally attach groups or individual contacts for immediate survey distribution.\n- Customize messages, sender information, and limit constraints.\n\nWhen contacts or groups are given, the response includes `sendOutcome`: how many people are being sent the message (`invited`) and how many were skipped, by reason. Two contacts in one request that share the address the collector sends to (the same email on an email collector, the same phone on an SMS collector) are sent one message; the second is counted in `sendOutcome` under `duplicate`. Send an `Idempotency-Key` header to make a retry safe.",
        "operationId": "create_collector_collector__post",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_collector_collector__post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A unique value (for example a UUID) that makes a retry safe. A repeat with the same key and the same body returns the first result and sends nothing again. The same key with a different body returns 422 (`idempotency_key_mismatch`). A repeat that arrives while the first request is still running, or before the first message of that send is about to go out, returns 409 (`send_in_progress`) with a `Retry-After` header. When the first attempt failed before its first message, or did not start sending within two minutes, the repeat cancels the invitations of that attempt and runs the request again, so it can be refused like any request (for example 402 when SMS credits ran short, or 503 `collector_busy` when another add is running on the collector). People invited again this way are not put through contact-added automations a second time. A repeated create adds the same people to the collector the first attempt created and returns that collector, never a second one; it needs the same rights on that collector as adding contacts.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ]
      },
      "get": {
        "tags": [
          "Collector"
        ],
        "summary": "List collectors",
        "description": "Retrieve a paginated list of collectors associated with the current department. You can filter by survey, status, type, and apply search queries.",
        "operationId": "list_collectors_by_current_department_collector__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search by name or id",
              "title": "Search"
            },
            "description": "Search by name or id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by status",
              "title": "Status"
            },
            "description": "Filter by status",
            "example": "OPEN"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by type",
              "title": "Type"
            },
            "description": "Filter by type",
            "example": "SMS"
          },
          {
            "name": "survey_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "title": "Survey Id"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SortBy"
                }
              ],
              "description": "Sort by ASC or DESC",
              "default": "DESC",
              "title": "Sortby"
            },
            "description": "Sort by ASC or DESC",
            "example": "ASC"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMaximum": 2147483647,
              "exclusiveMinimum": 0,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Pagesize"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_CollectorRead_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/collector/{collector_id}": {
      "get": {
        "tags": [
          "Collector"
        ],
        "summary": "Retrieve collector details",
        "description": "Get the details of a specific collector by its unique identifier.\n\n**What You Get**:\n- Basic collector configuration details.\n- Status and type of the collector.\n- Associated survey information and metadata.",
        "operationId": "get_collector_collector__collector_id__get",
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Collector"
        ],
        "summary": "Update an existing collector",
        "description": "Update configuration details of an existing collector such as message text, sender information, open/close dates, and associated rules.",
        "operationId": "update_collector_collector__collector_id__put",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_collector_collector__collector_id__put"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Collector"
        ],
        "summary": "Delete a collector",
        "description": "Mark a collector as deleted. The collector will no longer be considered active or listed in queries.",
        "operationId": "delete_collector_collector__collector_id__delete",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/collector/{collector_id}/contacts": {
      "post": {
        "tags": [
          "Collector"
        ],
        "summary": "Add multiple contacts to a collector",
        "description": "Add a batch of contacts and/or contact groups to an existing collector. The collector will then initiate message sends according to its configuration (e.g. sending survey invites).\n\nA person whose invitation on this collector was sent, or is still going out, is skipped and is not sent the message again. A collector with a sending rule keeps deciding by its rule. Two contacts in one request that share the address the collector sends to (the same email on an email collector, the same phone on an SMS collector) are sent one message; the second is counted in `sendOutcome` under `duplicate`. The response includes `sendOutcome`: how many people are being sent the message (`invited`) and how many were skipped, by reason. Send an `Idempotency-Key` header to make a retry safe.\n\nOne add runs on a collector at a time: a request that waits more than five seconds for another add on the same collector returns 503 (`collector_busy`) with a `Retry-After` header, nothing was added, and the same request can be sent again.",
        "operationId": "add_contacts_to_collector_collector__collector_id__contacts_post",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A unique value (for example a UUID) that makes a retry safe. A repeat with the same key and the same body returns the first result and sends nothing again. The same key with a different body returns 422 (`idempotency_key_mismatch`). A repeat that arrives while the first request is still running, or before the first message of that send is about to go out, returns 409 (`send_in_progress`) with a `Retry-After` header. When the first attempt failed before its first message, or did not start sending within two minutes, the repeat cancels the invitations of that attempt and runs the request again, so it can be refused like any request (for example 402 when SMS credits ran short, or 503 `collector_busy` when another add is running on the collector). People invited again this way are not put through contact-added automations a second time.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectorContactsUpdate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsAddedResponse"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/collector/{collector_id}/contact": {
      "post": {
        "tags": [
          "Collector"
        ],
        "summary": "Add a single contact to a collector",
        "description": "Add a single contact (with optional dynamic parameters) and/or a single group to an existing collector. This triggers the collector’s configured message sending logic.\n\nA person whose invitation on this collector was sent, or is still going out, is skipped and is not sent the message again. A collector with a sending rule keeps deciding by its rule. The response includes `sendOutcome`: how many people are being sent the message (`invited`) and how many were skipped, by reason.\n\nOne add runs on a collector at a time: a request that waits more than five seconds for another add on the same collector returns 503 (`collector_busy`) with a `Retry-After` header, nothing was added, and the same request can be sent again.",
        "operationId": "add_contact_to_collector_collector__collector_id__contact_post",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectorSingleContactsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/collector/{collector_id}/analytics/export": {
      "post": {
        "tags": [
          "Collector"
        ],
        "summary": "Export collector analytics to Excel",
        "description": "Queue an asynchronous task to export the collector’s analytics data to an Excel spreadsheet. The exported data can then be downloaded or further processed.",
        "operationId": "export_collector_analytics_collector__collector_id__analytics_export_post",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collector Id"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Startdate"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Enddate"
            }
          },
          {
            "name": "questionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Questionid"
            }
          },
          {
            "name": "answer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Answer"
            }
          },
          {
            "name": "dynamicParamKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Dynamicparamkey"
            }
          },
          {
            "name": "dynamicParamValue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Dynamicparamvalue"
            }
          },
          {
            "name": "questionsToSkip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "title": "Questionstoskip"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/contact-blacklist/": {
      "post": {
        "tags": [
          "Contact Blacklist"
        ],
        "summary": "Add an identifier to the blacklist",
        "description": "Add a contact identifier (email or phone number) to the **blacklist** for a given department.\n\n**Use Cases**:\n- Preventing future communications with a contact who opted out.\n- Excluding certain contacts from marketing campaigns.",
        "operationId": "add_blacklist_contact_contact_blacklist__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactBlacklistCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactBlacklistRead"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/contact-blacklist/department/{department_id}/{identifier}": {
      "get": {
        "tags": [
          "Contact Blacklist"
        ],
        "summary": "Check if an identifier is blacklisted",
        "description": "Check whether a given identifier (email/phone) is present in the blacklist for a specific department.\n\n**Use Cases**:\n- Quickly verifying if a contact is restricted from certain communications.\n- Automating checks before sending emails or SMS.",
        "operationId": "get_blacklist_contact_contact_blacklist_department__department_id___identifier__get",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Identifier"
            }
          },
          {
            "name": "department_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Department Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ContactBlacklistRead"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Blacklist Contact Contact Blacklist Department  Department Id   Identifier  Get"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/contact-blacklist/{blacklist_contact_id}": {
      "delete": {
        "tags": [
          "Contact Blacklist"
        ],
        "summary": "Remove an identifier from the blacklist",
        "description": "Remove an identifier from the **blacklist**, allowing future interactions with that contact.\n\n**Use Cases**:\n- Reinstating a contact who previously opted out but now wants to receive communications.\n- Correcting accidental blacklist entries.",
        "operationId": "remove_blacklist_contact_contact_blacklist__blacklist_contact_id__delete",
        "parameters": [
          {
            "name": "blacklist_contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Blacklist Contact Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/department/": {
      "get": {
        "tags": [
          "Department"
        ],
        "summary": "List departments for the current user",
        "description": "Retrieve a list of departments associated with the currently logged-in user.\n\n**Use Cases**:\n- Displaying a dropdown of departments the user can switch between.\n- Quickly navigating to relevant departments the user has access to.",
        "operationId": "list_by_current_user_department__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MinimalDepartmentRead"
                  },
                  "type": "array",
                  "title": "Response List By Current User Department  Get"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ]
      }
    },
    "/department/user/{user_id}": {
      "get": {
        "tags": [
          "Department"
        ],
        "summary": "List departments for a specific user",
        "description": "Retrieve a list of departments associated with a specific user by their user ID.\n\n**Use Cases**:\n- Admins checking which departments a particular user belongs to.\n- Granting or reviewing departmental access for a user.",
        "operationId": "list_by_user_id_department_user__user_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MinimalDepartmentRead"
                  },
                  "title": "Response List By User Id Department User  User Id  Get"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/department/{department_id}": {
      "get": {
        "tags": [
          "Department"
        ],
        "summary": "Get department by ID",
        "description": "Fetch detailed information about a department, including its logo URL, surveys, and default email settings.\n\n**Use Cases**:\n- Viewing department details in an admin panel.\n- Inspecting or modifying department-level configurations.",
        "operationId": "get_by_id_department__department_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "department_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Department Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/department/{department_id}/users": {
      "get": {
        "tags": [
          "Department"
        ],
        "summary": "List users in a department",
        "description": "Retrieve all users associated with a specific department, including their roles.\n\n**Use Cases**:\n- Viewing who has access to a department.\n- Administering user permissions and roles within a department.",
        "operationId": "get_department_users_department__department_id__users_get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "department_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Department Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DepartmentUserRead"
                  },
                  "title": "Response Get Department Users Department  Department Id  Users Get"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Department"
        ],
        "summary": "Add users to a department",
        "description": "This operation is retained for historical reference. Use Department settings in Pollarix to manage users.",
        "operationId": "add_users_department__department_id__users_post",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "department_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Department Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddUserFormValues"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DepartmentUserRead"
                  },
                  "title": "Response Add Users Department  Department Id  Users Post"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "deprecated": true
      }
    },
    "/department/{department_id}/users/{email}": {
      "delete": {
        "tags": [
          "Department"
        ],
        "summary": "Remove a user from a department",
        "description": "This operation is retained for historical reference. Use Department settings in Pollarix to manage users.",
        "operationId": "remove_user_department__department_id__users__email__delete",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "department_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Department Id"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "email",
              "title": "Email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "deprecated": true
      }
    },
    "/contact/group/{group_id}": {
      "get": {
        "tags": [
          "Contact"
        ],
        "summary": "List contacts by contact group ID",
        "description": "Fetch a paginated list of **contacts** that belong to a specified contact group.\n\n**Use Cases**:\n- Displaying members of a particular marketing segment (contact group).\n- Managing contacts in a specific targeted mailing group.",
        "operationId": "get_contacts_by_group_id_contact_group__group_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMaximum": 2147483647,
              "exclusiveMinimum": 0,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Pagesize"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_ContactRead_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/contact/{contact_id}": {
      "get": {
        "tags": [
          "Contact"
        ],
        "summary": "Get a contact by ID",
        "description": "Retrieve a single **contact** by its unique ID.\n\n**Use Cases**:\n- Viewing or editing a specific contact's details.\n- Checking a contact's presence and correctness.",
        "operationId": "get_by_id_contact__contact_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Contact Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Contact"
        ],
        "summary": "Update a contact",
        "description": "Update an existing **contact**'s details (e.g., name, email, phone).\n\n**Use Cases**:\n- Correcting outdated contact information.\n- Enhancing a contact record with additional data over time.",
        "operationId": "update_contact_contact__contact_id__put",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Contact Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactRead"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/contact/": {
      "post": {
        "tags": [
          "Contact"
        ],
        "summary": "Create a new contact",
        "description": "Create a single new **contact**. Optionally assign the contact to a specific group.\n\n**Use Cases**:\n- Adding a new client or lead to the department's contacts.\n- Associating a new contact directly with a marketing campaign group.",
        "operationId": "create_contact_contact__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_contact_contact__post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactRead"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ]
      }
    },
    "/contact/bulk": {
      "post": {
        "tags": [
          "Contact"
        ],
        "summary": "Bulk create contacts",
        "description": "Enqueue a background task to create multiple **contacts** in bulk. You can optionally assign them to a group or define if the group is organization-level.\n\n**Use Cases**:\n- Mass importing contacts from a CSV file.\n- Quickly adding a new batch of leads or clients.",
        "operationId": "create_contacts_contact_bulk_post",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "department_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Department Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_contacts_contact_bulk_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/coupon/group/{group_id}": {
      "get": {
        "tags": [
          "Coupon"
        ],
        "summary": "Get coupons by group ID",
        "description": "Retrieve a list of coupons for a specific group. This will include all coupons associated with the group.",
        "operationId": "get_coupons_by_group_id_coupon_group__group_id__get",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMaximum": 2147483647,
              "exclusiveMinimum": 0,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Pagesize"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_CouponRead_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Coupon"
        ],
        "summary": "Delete a coupon group",
        "description": "Delete a coupon group and all associated coupons. This operation is irreversible.",
        "operationId": "delete_group_coupon_group__group_id__delete",
        "security": [
          {
            "OAuth2PasswordBearerWithCookie": []
          }
        ],
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Group Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActionCreate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "ruleId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ruleid"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailActionParameters"
              },
              {
                "$ref": "#/components/schemas/SMSActionParameters"
              },
              {
                "$ref": "#/components/schemas/CouponActionParameters"
              },
              {
                "$ref": "#/components/schemas/WhatsAppActionParameters"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          }
        },
        "type": "object",
        "title": "ActionCreate"
      },
      "ActionType": {
        "type": "string",
        "enum": [
          "Coupon",
          "Email",
          "SMS",
          "WhatsApp",
          "Coupon Email",
          "Coupon SMS",
          "Coupon WhatsApp"
        ],
        "title": "ActionType",
        "description": "Action type enum."
      },
      "ActionUpdate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "ruleId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ruleid"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailActionParameters"
              },
              {
                "$ref": "#/components/schemas/SMSActionParameters"
              },
              {
                "$ref": "#/components/schemas/CouponActionParameters"
              },
              {
                "$ref": "#/components/schemas/WhatsAppActionParameters"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          }
        },
        "type": "object",
        "title": "ActionUpdate"
      },
      "AddUserFormValues": {
        "properties": {
          "emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Emails"
          },
          "role": {
            "$ref": "#/components/schemas/UserRoles"
          }
        },
        "type": "object",
        "required": [
          "emails",
          "role"
        ],
        "title": "AddUserFormValues"
      },
      "Body_create_collector_collector__post": {
        "properties": {
          "collector_in": {
            "$ref": "#/components/schemas/CollectorCreate"
          },
          "rules_in": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RuleCreate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules In"
          }
        },
        "type": "object",
        "required": [
          "collector_in"
        ],
        "title": "Body_create_collector_collector__post"
      },
      "Body_create_contact_contact__post": {
        "properties": {
          "contact_in": {
            "$ref": "#/components/schemas/ContactCreate"
          },
          "group_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          }
        },
        "type": "object",
        "required": [
          "contact_in"
        ],
        "title": "Body_create_contact_contact__post"
      },
      "Body_create_contacts_contact_bulk_post": {
        "properties": {
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/ContactCreate"
            },
            "type": "array",
            "title": "Contacts"
          },
          "group_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Name"
          },
          "group_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "org_level": {
            "type": "boolean",
            "title": "Org Level",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "contacts"
        ],
        "title": "Body_create_contacts_contact_bulk_post"
      },
      "Body_update_collector_collector__collector_id__put": {
        "properties": {
          "collector_in": {
            "$ref": "#/components/schemas/CollectorUpdate"
          },
          "rules_in": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RuleUpdate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules In"
          }
        },
        "type": "object",
        "required": [
          "collector_in"
        ],
        "title": "Body_update_collector_collector__collector_id__put"
      },
      "CollectorContactsAdd": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactCreate"
              },
              {
                "type": "null"
              }
            ]
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          }
        },
        "type": "object",
        "title": "CollectorContactsAdd"
      },
      "CollectorContactsUpdate": {
        "properties": {
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/CollectorContactsAdd"
            },
            "type": "array",
            "title": "Contacts"
          },
          "groupIds": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groupids"
          }
        },
        "type": "object",
        "required": [
          "contacts"
        ],
        "title": "CollectorContactsUpdate"
      },
      "CollectorCreate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "responseLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responselimit"
          },
          "completedResponsesCount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completedresponsescount"
          },
          "surveyId": {
            "type": "integer",
            "title": "Surveyid"
          },
          "type": {
            "$ref": "#/components/schemas/CollectorType"
          },
          "openDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opendate"
          },
          "closeDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closedate"
          },
          "fromEmail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailDomainEmail"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Senderid"
          },
          "messageText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messagetext"
          },
          "closedMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closedmessage"
          },
          "showUnsubscribe": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Showunsubscribe"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CollectorStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          },
          "isActive": {
            "type": "boolean",
            "title": "Isactive",
            "default": true
          },
          "isDeleted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isdeleted"
          },
          "buttonText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Buttontext"
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WhatsAppProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Templateid"
          },
          "phoneNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phonenumber"
          },
          "parameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "limitByIp": {
            "type": "boolean",
            "title": "Limitbyip",
            "default": true
          },
          "limitByCookie": {
            "type": "boolean",
            "title": "Limitbycookie",
            "default": true
          },
          "groupIds": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groupids"
          },
          "customId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customid"
          },
          "contacts": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CollectorContactsAdd"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contacts"
          }
        },
        "type": "object",
        "required": [
          "name",
          "surveyId",
          "type"
        ],
        "title": "CollectorCreate"
      },
      "CollectorRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "responseLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responselimit"
          },
          "completedResponsesCount": {
            "type": "integer",
            "title": "Completedresponsescount"
          },
          "surveyId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surveyid"
          },
          "type": {
            "$ref": "#/components/schemas/CollectorType"
          },
          "openDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opendate"
          },
          "closeDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closedate"
          },
          "fromEmail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailDomainEmail"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Senderid"
          },
          "messageText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messagetext"
          },
          "closedMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closedmessage"
          },
          "showUnsubscribe": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Showunsubscribe"
          },
          "status": {
            "$ref": "#/components/schemas/CollectorStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          },
          "isActive": {
            "type": "boolean",
            "title": "Isactive"
          },
          "isDeleted": {
            "type": "boolean",
            "title": "Isdeleted"
          },
          "buttonText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Buttontext"
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WhatsAppProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Templateid"
          },
          "phoneNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phonenumber"
          },
          "parameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "limitByIp": {
            "type": "boolean",
            "title": "Limitbyip"
          },
          "limitByCookie": {
            "type": "boolean",
            "title": "Limitbycookie"
          },
          "surveyTitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surveytitle"
          },
          "groups": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MinimalContactGroupRead"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groups"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "completedResponsesCount",
          "type",
          "status",
          "createdAt",
          "updatedAt",
          "isActive",
          "isDeleted",
          "limitByIp",
          "limitByCookie"
        ],
        "title": "CollectorRead",
        "description": "A survey collector returned by the API, including its configuration, channel, and current status."
      },
      "CollectorSingleContactsUpdate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactCreate"
              },
              {
                "type": "null"
              }
            ]
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          },
          "groupId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groupid"
          }
        },
        "type": "object",
        "title": "CollectorSingleContactsUpdate"
      },
      "CollectorStatus": {
        "type": "string",
        "enum": [
          "OPEN",
          "CLOSED",
          "DRAFT",
          "DELETED",
          "INACTIVE",
          "SCHEDULED",
          "RESPONSE_LIMIT_EXCEEDED"
        ],
        "title": "CollectorStatus",
        "description": "Collector status enum."
      },
      "CollectorType": {
        "type": "string",
        "enum": [
          "SMS",
          "EMAIL",
          "WEB_LINK",
          "WHATSAPP",
          "WIDGET"
        ],
        "title": "CollectorType",
        "description": "Collector type enum."
      },
      "CollectorUpdate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "responseLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responselimit"
          },
          "completedResponsesCount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completedresponsescount"
          },
          "surveyId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surveyid"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CollectorType"
              },
              {
                "type": "null"
              }
            ]
          },
          "openDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opendate"
          },
          "closeDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closedate"
          },
          "fromEmail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailDomainEmail"
              },
              {
                "type": "null"
              }
            ]
          },
          "senderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Senderid"
          },
          "messageText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messagetext"
          },
          "closedMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closedmessage"
          },
          "showUnsubscribe": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Showunsubscribe"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CollectorStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive"
          },
          "isDeleted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isdeleted"
          },
          "buttonText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Buttontext"
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WhatsAppProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Templateid"
          },
          "phoneNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phonenumber"
          },
          "parameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "limitByIp": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limitbyip"
          },
          "limitByCookie": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limitbycookie"
          }
        },
        "type": "object",
        "title": "CollectorUpdate"
      },
      "ConditionCreate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "ruleId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ruleid"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "type": {
            "$ref": "#/components/schemas/ConditionTypes"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ConditionCreate"
      },
      "ConditionTypes": {
        "type": "string",
        "enum": [
          "Survey Opened",
          "Survey Completed",
          "Survey Score Below",
          "Survey Score Above",
          "Survey Score Below Percentage",
          "Survey Score Above Percentage"
        ],
        "title": "ConditionTypes"
      },
      "ConditionUpdate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "ruleId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ruleid"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "type": {
            "$ref": "#/components/schemas/ConditionTypes"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ConditionUpdate"
      },
      "ContactBlacklistCreate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "identifier": {
            "type": "string",
            "title": "Identifier"
          },
          "departmentId": {
            "type": "string",
            "format": "uuid",
            "title": "Departmentid"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "identifier",
          "departmentId"
        ],
        "title": "ContactBlacklistCreate"
      },
      "ContactBlacklistRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "identifier": {
            "type": "string",
            "title": "Identifier"
          },
          "departmentId": {
            "type": "string",
            "format": "uuid",
            "title": "Departmentid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "identifier",
          "departmentId",
          "createdAt"
        ],
        "title": "ContactBlacklistRead"
      },
      "ContactCreate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "departmentId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Departmentid"
          }
        },
        "type": "object",
        "title": "ContactCreate"
      },
      "ContactRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "departmentId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Departmentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ContactRead"
      },
      "ContactUpdate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Externalid"
          },
          "departmentId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Departmentid"
          }
        },
        "type": "object",
        "title": "ContactUpdate"
      },
      "ContactsAddedResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success"
          },
          "collectorId": {
            "type": "string",
            "title": "Collectorid"
          }
        },
        "type": "object",
        "required": [
          "collectorId"
        ],
        "title": "ContactsAddedResponse"
      },
      "CouponActionParameters": {
        "properties": {
          "couponGroupId": {
            "type": "integer",
            "title": "Coupongroupid"
          },
          "couponMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Couponmessage"
          }
        },
        "type": "object",
        "required": [
          "couponGroupId"
        ],
        "title": "CouponActionParameters"
      },
      "CouponRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "expirationDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expirationdate"
          },
          "groupId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Groupid",
            "default": [
              null
            ]
          },
          "redeemed": {
            "type": "boolean",
            "title": "Redeemed"
          },
          "redeemedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redeemedat"
          },
          "surveyResponseId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Surveyresponseid"
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "redeemed"
        ],
        "title": "CouponRead"
      },
      "DepartmentRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "companyName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Companyname"
          },
          "logoId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logoid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "title": "Organizationid"
          },
          "defaultEmail": {
            "$ref": "#/components/schemas/EmailDomainEmail"
          },
          "logoUrl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logourl"
          },
          "surveys": {
            "items": {
              "$ref": "#/components/schemas/SurveyRead"
            },
            "type": "array",
            "title": "Surveys"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "organizationId",
          "defaultEmail",
          "surveys"
        ],
        "title": "DepartmentRead"
      },
      "DepartmentUserRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "isActive": {
            "type": "boolean",
            "title": "Isactive"
          },
          "firstName": {
            "type": "string",
            "title": "Firstname"
          },
          "lastName": {
            "type": "string",
            "title": "Lastname"
          },
          "isSuperuser": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issuperuser"
          },
          "phoneNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phonenumber"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "role": {
            "$ref": "#/components/schemas/UserRoles"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "isActive",
          "firstName",
          "lastName",
          "createdAt",
          "role"
        ],
        "title": "DepartmentUserRead"
      },
      "EmailActionParameters": {
        "properties": {
          "fromEmail": {
            "$ref": "#/components/schemas/EmailDomainEmail"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "recipient": {
            "type": "string",
            "title": "Recipient",
            "default": "surveyFiller"
          },
          "couponGroupId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coupongroupid"
          }
        },
        "type": "object",
        "required": [
          "fromEmail",
          "subject",
          "body"
        ],
        "title": "EmailActionParameters"
      },
      "EmailDomainEmail": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "EmailDomainEmail"
      },
      "ErrorMessage": {
        "properties": {
          "msg": {
            "type": "string",
            "title": "Msg"
          }
        },
        "type": "object",
        "required": [
          "msg"
        ],
        "title": "ErrorMessage"
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ErrorMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "ErrorResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "MinimalContactGroupRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "departmentId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Departmentid"
          },
          "organizationId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organizationid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt"
        ],
        "title": "MinimalContactGroupRead"
      },
      "MinimalDepartmentRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "companyName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Companyname"
          },
          "logoId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logoid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "title": "Organizationid"
          },
          "defaultEmail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailDomainEmail"
              },
              {
                "type": "null"
              }
            ]
          },
          "logoUrl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logourl"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "organizationId"
        ],
        "title": "MinimalDepartmentRead"
      },
      "MinimalSurveyRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "type": {
            "$ref": "#/components/schemas/SurveyType"
          },
          "content": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          },
          "themeId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Themeid"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "createdAt",
          "updatedAt"
        ],
        "title": "MinimalSurveyRead",
        "description": "The summary of a survey returned in a department survey list."
      },
      "MinimalSurveyResponseRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/SurveyResponseStatus"
          },
          "contactId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contactid"
          },
          "collectorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collectorid"
          },
          "expireIn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expirein"
          },
          "content": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "maxScore": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxscore"
          },
          "totalScore": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totalscore"
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "surveyId": {
            "type": "integer",
            "title": "Surveyid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "surveyId",
          "createdAt",
          "updatedAt"
        ],
        "title": "MinimalSurveyResponseRead"
      },
      "Oauth2Login": {
        "properties": {
          "apiKey": {
            "type": "string",
            "format": "uuid",
            "title": "Apikey"
          },
          "apiSecret": {
            "type": "string",
            "title": "Apisecret"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "apiKey",
          "apiSecret",
          "email"
        ],
        "title": "Oauth2Login"
      },
      "PaginatedResponse_CollectorRead_": {
        "properties": {
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          },
          "totalCount": {
            "type": "integer",
            "title": "Totalcount"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CollectorRead"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "page",
          "pageSize",
          "totalCount",
          "data"
        ],
        "title": "PaginatedResponse[CollectorRead]"
      },
      "PaginatedResponse_ContactRead_": {
        "properties": {
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          },
          "totalCount": {
            "type": "integer",
            "title": "Totalcount"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContactRead"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "page",
          "pageSize",
          "totalCount",
          "data"
        ],
        "title": "PaginatedResponse[ContactRead]"
      },
      "PaginatedResponse_CouponRead_": {
        "properties": {
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          },
          "totalCount": {
            "type": "integer",
            "title": "Totalcount"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CouponRead"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "page",
          "pageSize",
          "totalCount",
          "data"
        ],
        "title": "PaginatedResponse[CouponRead]"
      },
      "PaginatedResponse_MinimalSurveyResponseRead_": {
        "properties": {
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          },
          "totalCount": {
            "type": "integer",
            "title": "Totalcount"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/MinimalSurveyResponseRead"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "page",
          "pageSize",
          "totalCount",
          "data"
        ],
        "title": "PaginatedResponse[MinimalSurveyResponseRead]"
      },
      "RuleCreate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "operator": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operator"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive"
          },
          "collectorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collectorid"
          },
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/ConditionCreate"
            },
            "type": "array",
            "title": "Conditions"
          },
          "actions": {
            "items": {
              "$ref": "#/components/schemas/ActionCreate"
            },
            "type": "array",
            "title": "Actions"
          }
        },
        "type": "object",
        "required": [
          "conditions",
          "actions"
        ],
        "title": "RuleCreate"
      },
      "RuleUpdate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "operator": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operator"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive"
          },
          "collectorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collectorid"
          },
          "conditions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ConditionUpdate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions"
          },
          "actions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ActionUpdate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actions"
          }
        },
        "type": "object",
        "title": "RuleUpdate"
      },
      "SMSActionParameters": {
        "properties": {
          "senderId": {
            "type": "string",
            "title": "Senderid"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "recipient": {
            "type": "string",
            "title": "Recipient",
            "default": "surveyFiller"
          },
          "couponGroupId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coupongroupid"
          }
        },
        "type": "object",
        "required": [
          "senderId",
          "message"
        ],
        "title": "SMSActionParameters"
      },
      "SortBy": {
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ],
        "title": "SortBy",
        "description": "Sort by enum."
      },
      "SurveyRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "type": {
            "$ref": "#/components/schemas/SurveyType"
          },
          "content": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          },
          "themeId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Themeid"
          },
          "theme": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SurveyThemeRead"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "content",
          "createdAt",
          "updatedAt"
        ],
        "title": "SurveyRead"
      },
      "SurveyResponseRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "$ref": "#/components/schemas/SurveyResponseStatus"
          },
          "contactId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contactid"
          },
          "collectorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collectorid"
          },
          "expireIn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expirein"
          },
          "content": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "maxScore": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxscore"
          },
          "totalScore": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totalscore"
          },
          "dynamicParameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicparameters"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "surveyId": {
            "type": "integer",
            "title": "Surveyid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactRead"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "surveyId",
          "createdAt",
          "updatedAt"
        ],
        "title": "SurveyResponseRead",
        "description": "A survey response returned for a specific response ID, including status and response metadata."
      },
      "SurveyResponseStatus": {
        "type": "string",
        "enum": [
          "CREATED",
          "IN_PROGRESS",
          "COMPLETED",
          "PENDING_REVIEW",
          "REVIEWED",
          "ARCHIVED",
          "CANCELLED",
          "EXPIRED"
        ],
        "title": "SurveyResponseStatus"
      },
      "SurveyThemeRead": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "departmentId": {
            "type": "string",
            "format": "uuid",
            "title": "Departmentid"
          },
          "theme": {
            "type": "object",
            "title": "Theme"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "isPublic": {
            "type": "boolean",
            "title": "Ispublic"
          }
        },
        "type": "object",
        "required": [
          "id",
          "departmentId",
          "theme",
          "name",
          "isPublic"
        ],
        "title": "SurveyThemeRead"
      },
      "SurveyType": {
        "type": "string",
        "enum": [
          "survey",
          "widget"
        ],
        "title": "SurveyType"
      },
      "TokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "token_type",
          "expires_in"
        ],
        "title": "TokenResponse",
        "description": "The access token, bearer token type, and expiry returned after a successful credential exchange."
      },
      "UserRoles": {
        "type": "string",
        "enum": [
          "implementor",
          "user",
          "admin",
          "api",
          "read_only"
        ],
        "title": "UserRoles"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "description": "The location, message, and type of a request validation error."
      },
      "WhatsAppActionParameters": {
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/WhatsAppProvider"
          },
          "fromPhoneNumber": {
            "type": "string",
            "title": "Fromphonenumber"
          },
          "templateId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ],
            "title": "Templateid"
          },
          "parameters": {
            "type": "object",
            "title": "Parameters"
          },
          "couponGroupId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coupongroupid"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "fromPhoneNumber",
          "templateId",
          "parameters"
        ],
        "title": "WhatsAppActionParameters"
      },
      "WhatsAppProvider": {
        "type": "string",
        "const": "glassix",
        "title": "WhatsAppProvider"
      }
    },
    "securitySchemes": {
      "OAuth2PasswordBearerWithCookie": {
        "type": "oauth2",
        "flows": {
          "password": {
            "scopes": {},
            "tokenUrl": "/api/v1/auth/access-token"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "\n**Auth** endpoints allow you to handle user authentication, manage user departments, \ncontrol access tokens, and reset user passwords.\n\n**Key functionalities**:\n- **Login and Logout**: Obtain tokens to access protected endpoints.\n- **Password Reset**: Initiate and complete forgot/reset password flows.\n- **User Department Management**: Update which departments a user belongs to and their roles.\n- **Token Utilities**: Validate reCAPTCHA, retrieve survey tokens, and handle OAuth2 token flows.\n        ",
      "x-displayName": "Authentication"
    },
    {
      "name": "Collector",
      "description": "\n**Collector** endpoints allow you to manage the survey collectors that distribute surveys to respondents through various channels (e.g., Email, SMS, or Widget).\n\n**Key functionalities**:\n- **Create collectors**: Define a new collector with associated survey and distribution parameters.\n- **Add contacts**: Introduce recipient contacts (individually or via groups) to your collector for survey distribution.\n- **View and update collectors**: Retrieve collector details, update configurations or close them.\n- **View statistics and analytics**: Get insights into collector performance, including response counts, distribution statistics, and score analytics.\n        ",
      "x-displayName": "Survey Collectors"
    },
    {
      "name": "Survey",
      "description": "\n**Survey** endpoints allow you to create, retrieve, update, duplicate, and delete surveys within your application.\n\n**Key functionalities**:\n- **Create Surveys**: Define new surveys with customizable content and themes.\n- **Retrieve Surveys**: Fetch detailed or minimal information about surveys.\n- **Update Surveys**: Modify existing surveys, including their content and associated themes.\n- **Duplicate Surveys**: Create copies of existing surveys for quick replication or modification.\n- **Delete Surveys**: Remove surveys from the system when they are no longer needed.\n- **Survey Content Management**: Handle complex survey structures, including questions, choices, and themes.\n        ",
      "x-displayName": "Surveys"
    },
    {
      "name": "Survey Response",
      "description": "\n**Survey Response** endpoints allow you to create, retrieve, update, and manage responses to surveys generated by your system.\n\n**Key functionalities**:\n- **Retrieve Responses**: Get a single response by ID or list responses filtered by survey or collector.\n- **Create Responses**: Submit a new response to a specific survey.\n- **Update Responses**: Mark a response as completed, update its status, or modify its data.\n- **Workflow Integration**: Trigger business logic workflows and send webhooks when responses are updated or completed.\n- **Analytics and Filtering**: Query responses by date range, status, contact details, scores, and dynamic parameters.\n",
      "x-displayName": "Survey Responses"
    },
    {
      "name": "Organization",
      "description": "\n**Organization** endpoints allow you to manage top-level organizational entities, which encompass multiple departments.\n\n**Key functionalities**:\n- **Create Organizations**: Define new organizations.\n- **Retrieve Organizations**: Fetch details about existing organizations.\n- **Update Organizations**: Modify organization information.\n- **Delete Organizations**: Remove organizations from the system.\n        ",
      "x-displayName": "Organizations"
    },
    {
      "name": "Department",
      "description": "\n**Department** endpoints allow you to manage departments within an organization. \nA department is associated with users, surveys, and other related resources.\n\n**Key functionalities**:\n- **Create Departments**: Define a new department within an existing organization.\n- **Retrieve Departments**: Fetch details or minimal info about departments.\n- **Update Departments**: Modify department details, including its logo and default email.\n- **Manage Department Users**: Add or remove users from a department, controlling their roles and permissions.\n- **Manage Department API Access**: Retrieve or generate API tokens for department-level integrations.\n        ",
      "x-displayName": "Departments"
    },
    {
      "name": "Contact",
      "description": "\n**Contact** endpoints allow managing contacts within your departments and organizations.\n\n**Key functionalities**:\n- **Create Contacts**: Add new contacts (individually or in bulk).\n- **Retrieve Contacts**: Fetch contacts by group, search query, or ID.\n- **Update Contacts**: Modify contact details.\n- **Delete Contacts**: Remove contacts from groups or bulk delete from a group.\n",
      "x-displayName": "Contacts"
    },
    {
      "name": "Contact Blacklist",
      "description": "\n**Contact Blacklist** endpoints allow you to manage a list of identifiers (emails or phone numbers) \nthat should not be contacted or are excluded from certain operations.\n\n**Key functionalities**:\n- **Add to Blacklist**: Add a contact identifier (email/phone) to the blacklist.\n- **Check Blacklist**: Verify if a given identifier is blacklisted for a department.\n- **Remove from Blacklist**: Remove an identifier from the blacklist.\n",
      "x-displayName": "Contact Blacklist"
    },
    {
      "name": "Email Domain",
      "description": "\n**Email Domain** endpoints allow you to manage the email domains associated with departments.\n\n**Key functionalities**:\n- **Add Email Domains**: Associate new email domains with departments.\n- **Retrieve Email Domains**: Fetch email domain details.\n- **Update Email Domains**: Modify email domain configurations.\n- **Verify Email Domains**: Validate email domains for department use.\n",
      "x-displayName": "Email Domains"
    },
    {
      "name": "Coupon",
      "description": "\n**Coupon** endpoints allow you to manage coupon codes, groups, and bulk operations within your application.\n\n**Key functionalities**:\n- **Create Coupons**: Generate new coupon codes for distribution.\n- **Retrieve Coupons**: Fetch coupon details, search by group, or retrieve by ID.\n- **Update Coupons**: Modify coupon details, including group association.\n- **Delete Coupons**: Remove coupons from the system.\n",
      "x-displayName": "Coupons"
    }
  ],
  "servers": [
    {
      "url": "https://api.pollarix.com/api/v1",
      "description": "Pollarix API"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Authentication",
      "tags": [
        "Auth"
      ]
    },
    {
      "name": "Survey Management",
      "tags": [
        "Survey",
        "Survey Response"
      ]
    },
    {
      "name": "Distribution",
      "tags": [
        "Collector"
      ]
    },
    {
      "name": "Contact Management",
      "tags": [
        "Contact",
        "Contact Blacklist"
      ]
    },
    {
      "name": "Organization",
      "tags": [
        "Organization",
        "Department"
      ]
    },
    {
      "name": "Email & Coupons",
      "tags": [
        "Email Domain",
        "Coupon"
      ]
    }
  ]
}
