{
  "openapi": "3.1.1",
  "info": {
    "title": "Wapi — WhatsApp Cloud API middleware",
    "description": "Middleware multi-tenant para enviar y recibir mensajes vía la Cloud API de Meta.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://wapiapi-chf7crfwc7dmcnce.canadacentral-01.azurewebsites.net/"
    }
  ],
  "paths": {
    "/api/agent/queues": {
      "get": {
        "tags": [
          "Agent"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent/entries": {
      "get": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent/entries/{id}/claim": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent/entries/{id}/assign": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent/entries/{id}/close": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent/entries/{id}/reply": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentReplyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentReplyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgentReplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent/entries/{id}/transfer": {
      "post": {
        "tags": [
          "Agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ai-functions": {
      "get": {
        "tags": [
          "AiFunctions"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "AiFunctions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiFunctionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AiFunctionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AiFunctionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ai-functions/{id}": {
      "put": {
        "tags": [
          "AiFunctions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiFunctionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AiFunctionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AiFunctionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "AiFunctions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ai-functions/{id}/test": {
      "post": {
        "tags": [
          "AiFunctions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{tenantId}/apikeys": {
      "post": {
        "tags": [
          "ApiKeys"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "ApiKeys"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{tenantId}/apikeys/{keyId}": {
      "delete": {
        "tags": [
          "ApiKeys"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/refresh": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/register": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/invoices": {
      "get": {
        "tags": [
          "BillingAdmin"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "underreview"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/invoices/{id}/confirm": {
      "post": {
        "tags": [
          "BillingAdmin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPaymentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPaymentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/invoices/{id}/cancel": {
      "post": {
        "tags": [
          "BillingAdmin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/preview": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignPreviewRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignPreviewRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/{id}": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/{id}/recipients": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/{id}/schedule": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCampaignRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCampaignRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCampaignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/{id}/pause": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/{id}/resume": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/campaigns/{id}/cancel": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analysis": {
      "get": {
        "tags": [
          "ChatAnalysis"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sentiment",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resolved",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "escalationRecommended",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/analysis/summary": {
      "get": {
        "tags": [
          "ChatAnalysis"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/analysis": {
      "get": {
        "tags": [
          "ChatAnalysis"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ChatAnalysis"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/config": {
      "get": {
        "tags": [
          "Config"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "optedOut",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "blocked",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "windowOpen",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedContactsResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedContactsResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedContactsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/tags": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TagCount"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TagCount"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TagCount"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetailResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/messages": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/notes": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContactNoteResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContactNoteResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContactNoteResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNoteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNoteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ContactNoteResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactNoteResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactNoteResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/notes/{noteId}": {
      "delete": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/window": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/opt-out": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/opt-in": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/block": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/unblock": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/blocked": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/contacts/{waId}/tasks": {
      "get": {
        "tags": [
          "ContactTasks"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeClosed",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ContactTasks"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactTaskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactTaskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ContactTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tasks": {
      "get": {
        "tags": [
          "ContactTasks"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignedUserId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "overdue",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tasks/{id}": {
      "put": {
        "tags": [
          "ContactTasks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactTaskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactTaskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ContactTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ContactTasks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/files": {
      "post": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/files/{name}": {
      "get": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/flows": {
      "post": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowDefinitionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowDefinitionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FlowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/flows/{id}": {
      "get": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowDefinitionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowDefinitionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FlowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/flows/{id}/enable": {
      "post": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/flows/{id}/disable": {
      "post": {
        "tags": [
          "Flows"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/knowledge": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Knowledge"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDocumentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDocumentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/knowledge/{id}": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Knowledge"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDocumentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDocumentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Knowledge"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/knowledge/{id}/reindex": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/knowledge/search": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 4
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/logs": {
      "get": {
        "tags": [
          "Logs"
        ],
        "parameters": [
          {
            "name": "level",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/LogSeverity"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "traceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedLogsResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedLogsResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedLogsResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Logs"
        ],
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "olderThanDays",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/logs/{id}": {
      "get": {
        "tags": [
          "Logs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LogEntryDetailResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogEntryDetailResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogEntryDetailResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/logs/summary": {
      "get": {
        "tags": [
          "Logs"
        ],
        "parameters": [
          {
            "name": "hours",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LogSummaryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogSummaryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogSummaryResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/accounts": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/accounts/sandbox": {
      "post": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/accounts/{id}": {
      "delete": {
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/users": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/roles": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/roles/{id}": {
      "put": {
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/plan": {
      "put": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/apikeys": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/apikeys/{keyId}": {
      "delete": {
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/ai": {
      "put": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantAiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantAiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantAiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/{waMessageId}/read": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waMessageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typing",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/text": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTextRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTextRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendTextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/template": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTemplateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTemplateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/media": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMediaLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMediaLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendMediaLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/media/from-storage": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMediaFromStorageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMediaFromStorageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendMediaFromStorageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/location": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendLocationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendLocationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/reaction": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendReactionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendReactionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendReactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/contacts": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendContactsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendContactsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendContactsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/flow": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendFlowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/product": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendProductRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendProductRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/media/upload": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "to": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "file": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "caption": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "filename": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "replyToMessageId": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages": {
      "get": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/stream": {
      "get": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/search": {
      "get": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "waId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/messages/{messageId}/status": {
      "get": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/onboarding/config": {
      "get": {
        "tags": [
          "Onboarding"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupConfig"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupConfig"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupConfig"
                }
              }
            }
          }
        }
      }
    },
    "/api/onboarding/complete": {
      "post": {
        "tags": [
          "Onboarding"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteSignupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteSignupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteSignupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/overview": {
      "get": {
        "tags": [
          "PlatformAdmin"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 14
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/plans": {
      "get": {
        "tags": [
          "PlatformAdmin"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/summary": {
      "get": {
        "tags": [
          "PlatformAdmin"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{id}/summary": {
      "get": {
        "tags": [
          "PlatformAdmin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "months",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{id}/statistics": {
      "get": {
        "tags": [
          "PlatformAdmin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{id}/active": {
      "post": {
        "tags": [
          "PlatformAdmin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SetTenantActiveRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SetTenantActiveRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SetTenantActiveRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/audit": {
      "get": {
        "tags": [
          "PlatformAdmin"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform-auth/login": {
      "post": {
        "tags": [
          "PlatformAuth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformLoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformLoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformLoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform-auth/me": {
      "get": {
        "tags": [
          "PlatformAuth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform-auth/users": {
      "get": {
        "tags": [
          "PlatformAuth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PlatformAuth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlatformUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlatformUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlatformUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform-auth/users/{id}/active": {
      "post": {
        "tags": [
          "PlatformAuth"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/plan": {
      "get": {
        "tags": [
          "Platform"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/plans": {
      "get": {
        "tags": [
          "Platform"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/usage": {
      "get": {
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "months",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 6
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/billing": {
      "get": {
        "tags": [
          "Platform"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/billing-profile": {
      "get": {
        "tags": [
          "Platform"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BillingProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/invoices": {
      "get": {
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/invoices/{id}/payment": {
      "post": {
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportPaymentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportPaymentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/audit": {
      "get": {
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/contacts/export": {
      "get": {
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/platform/contacts/import": {
      "post": {
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/webhooks/whatsapp": {
      "get": {
        "tags": [
          "PlatformWebhooks"
        ],
        "parameters": [
          {
            "name": "hub.mode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.verify_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.challenge",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "PlatformWebhooks"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/queues": {
      "post": {
        "tags": [
          "Queues"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQueueRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQueueRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQueueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Queues"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueueResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueueResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueueResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{id}": {
      "get": {
        "tags": [
          "Queues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Queues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateQueueRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateQueueRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateQueueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Queues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "force",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/queues/{id}/members": {
      "post": {
        "tags": [
          "Queues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemberRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemberRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/queues/{id}/members/{userId}": {
      "delete": {
        "tags": [
          "Queues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/queues/{id}/entries": {
      "get": {
        "tags": [
          "Queues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/QueueEntryStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/quick-replies": {
      "get": {
        "tags": [
          "QuickReplies"
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "QuickReplies"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickReplyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickReplyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/QuickReplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/quick-replies/{id}": {
      "put": {
        "tags": [
          "QuickReplies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickReplyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickReplyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/QuickReplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "QuickReplies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/quick-replies/{id}/render": {
      "get": {
        "tags": [
          "QuickReplies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{tenantId}/roles": {
      "post": {
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{tenantId}/roles/{roleId}": {
      "put": {
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{accountId}/sandbox/inbound": {
      "post": {
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxInboundRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxInboundRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxInboundRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/sandbox/status": {
      "post": {
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/segments": {
      "get": {
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Segments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/segments/{id}": {
      "get": {
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/segments/{id}/preview": {
      "get": {
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/segments/preview": {
      "post": {
        "tags": [
          "Segments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/sessions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/sessions/{waId}/close": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/sessions/{waId}/takeover": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/sessions/{waId}/release": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/sessions/{waId}": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "waId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/webhooks/social": {
      "get": {
        "tags": [
          "SocialWebhooks"
        ],
        "parameters": [
          {
            "name": "hub.mode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.verify_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.challenge",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "SocialWebhooks"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/statistics": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 7
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/statistics/accounts/{accountId}": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 7
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/storage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/surveys": {
      "get": {
        "tags": [
          "Surveys"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Surveys"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/surveys/{id}": {
      "get": {
        "tags": [
          "Surveys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Surveys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Surveys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/surveys/{id}/send": {
      "post": {
        "tags": [
          "Surveys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSurveyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSurveyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendSurveyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/surveys/{id}/responses": {
      "get": {
        "tags": [
          "Surveys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/surveys/{id}/results": {
      "get": {
        "tags": [
          "Surveys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/team/metrics": {
      "get": {
        "tags": [
          "TeamMetrics"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 7
            }
          },
          {
            "name": "queueId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/team/metrics/agents": {
      "get": {
        "tags": [
          "TeamMetrics"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 7
            }
          },
          {
            "name": "queueId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/team/metrics/heatmap": {
      "get": {
        "tags": [
          "TeamMetrics"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 14
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/team/metrics/sla-breaches": {
      "get": {
        "tags": [
          "TeamMetrics"
        ],
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/billing/usage": {
      "get": {
        "tags": [
          "TeamMetrics"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/templates": {
      "post": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/templates/{name}": {
      "delete": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tenants"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{id}": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{id}/ai": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantAiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantAiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantAiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{id}/plan": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantPlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantPlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{tenantId}/accounts": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tenants"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{tenantId}/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/status": {
      "get": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/phone-numbers": {
      "get": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/profile": {
      "get": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBusinessProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBusinessProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBusinessProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/throughput": {
      "get": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/throughput/upgrade": {
      "post": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/subscription": {
      "get": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/accounts/{accountId}/waba/webhook-diagnostics": {
      "get": {
        "tags": [
          "Waba"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/webhook-events": {
      "get": {
        "tags": [
          "WebhookEvents"
        ],
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "field",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pending",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/webhooks/whatsapp/{accountId}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "hub.mode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.verify_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.challenge",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/webhook-subscriptions": {
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/webhook-subscriptions/{id}": {
      "delete": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "wabaId": {
            "type": "string"
          },
          "phoneNumberId": {
            "type": "string"
          },
          "displayPhoneNumber": {
            "type": "string"
          },
          "webhookVerifyToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "isSandbox": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountStat": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "messages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AddMemberRequest": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AgentReplyRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          }
        }
      },
      "AiFunctionRequest": {
        "required": [
          "name",
          "description",
          "url"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parametersJsonSchema": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "method": {
            "type": [
              "null",
              "string"
            ]
          },
          "headers": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "timeoutSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "ApiKeyCreatedResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AssignRequest": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "BillingProfileRequest": {
        "required": [
          "nombre",
          "tipoIdentificacion",
          "numeroIdentificacion",
          "correoElectronico"
        ],
        "type": "object",
        "properties": {
          "nombre": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "tipoIdentificacion": {
            "type": "string"
          },
          "numeroIdentificacion": {
            "type": "string"
          },
          "nombreComercial": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "codigoActividad": {
            "maxLength": 10,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "provincia": {
            "type": [
              "null",
              "string"
            ]
          },
          "canton": {
            "type": [
              "null",
              "string"
            ]
          },
          "distrito": {
            "type": [
              "null",
              "string"
            ]
          },
          "barrio": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "otrasSenas": {
            "maxLength": 300,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "telefonoCodigoPais": {
            "type": [
              "null",
              "string"
            ]
          },
          "telefonoNumero": {
            "type": [
              "null",
              "string"
            ]
          },
          "correoElectronico": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "BusinessHourSlot": {
        "required": [
          "open",
          "close"
        ],
        "type": "object",
        "properties": {
          "dayOfWeek": {
            "maximum": 6,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "open": {
            "type": "string"
          },
          "close": {
            "type": "string"
          }
        }
      },
      "CampaignPreviewRequest": {
        "required": [
          "accountId"
        ],
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "includeTags": {
            "type": [
              "null",
              "string"
            ]
          },
          "excludeTags": {
            "type": [
              "null",
              "string"
            ]
          },
          "matchAllTags": {
            "type": "boolean"
          },
          "segmentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CampaignRequest": {
        "required": [
          "accountId",
          "name",
          "templateName"
        ],
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "templateName": {
            "type": "string"
          },
          "languageCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "segmentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "includeTags": {
            "type": [
              "null",
              "string"
            ]
          },
          "excludeTags": {
            "type": [
              "null",
              "string"
            ]
          },
          "matchAllTags": {
            "type": "boolean"
          },
          "template": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SendTemplateRequest"
              }
            ]
          }
        }
      },
      "ChangePlanRequest": {
        "required": [
          "plan"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          }
        }
      },
      "CompleteSignupRequest": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "wabaId": {
            "maxLength": 64,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumberId": {
            "maxLength": 64,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConfirmPaymentRequest": {
        "type": "object",
        "properties": {
          "confirmed": {
            "type": "boolean"
          },
          "notes": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactActivity": {
        "type": "object",
        "properties": {
          "totalMessages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "firstMessageAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastMessageAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastMessagePreview": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactBotState": {
        "type": "object",
        "properties": {
          "flowId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "flowName": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentNodeKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          },
          "variables": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactCard": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/ContactCardName"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactCardPhone"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactCardEmail"
            }
          },
          "birthday": {
            "type": [
              "null",
              "string"
            ]
          },
          "org": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ContactCardOrg"
              }
            ]
          },
          "urls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactCardUrl"
            }
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactCardAddress"
            }
          }
        }
      },
      "ContactCardAddress": {
        "type": "object",
        "properties": {
          "street": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "zip": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "countryCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactCardEmail": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactCardName": {
        "required": [
          "formattedName"
        ],
        "type": "object",
        "properties": {
          "formattedName": {
            "type": "string"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "middleName": {
            "type": [
              "null",
              "string"
            ]
          },
          "prefix": {
            "type": [
              "null",
              "string"
            ]
          },
          "suffix": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactCardOrg": {
        "type": "object",
        "properties": {
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "department": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactCardPhone": {
        "required": [
          "phone"
        ],
        "type": "object",
        "properties": {
          "phone": {
            "type": "string"
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "waId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactCardUrl": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactDetailResponse": {
        "type": "object",
        "properties": {
          "waId": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "profileName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "optedOut": {
            "type": "boolean"
          },
          "optedOutAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "blocked": {
            "type": "boolean"
          },
          "blockedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "windowOpen": {
            "type": "boolean"
          },
          "windowExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastInboundAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "activity": {
            "$ref": "#/components/schemas/ContactActivity"
          },
          "bot": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ContactBotState"
              }
            ]
          },
          "queue": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ContactQueueState"
              }
            ]
          },
          "noteCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ContactListItem": {
        "type": "object",
        "properties": {
          "waId": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "optedOut": {
            "type": "boolean"
          },
          "blocked": {
            "type": "boolean"
          },
          "windowOpen": {
            "type": "boolean"
          },
          "lastInboundAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactNoteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "text": {
            "type": "string"
          },
          "authorUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "authorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactQueueState": {
        "type": "object",
        "properties": {
          "entryId": {
            "type": "string",
            "format": "uuid"
          },
          "queueId": {
            "type": "string",
            "format": "uuid"
          },
          "queueName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "assignedUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "assignedUserName": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactTaskRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "assignedUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateAccountRequest": {
        "required": [
          "displayName",
          "phoneNumberId",
          "accessToken"
        ],
        "type": "object",
        "properties": {
          "channel": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayName": {
            "type": "string"
          },
          "wabaId": {
            "type": "string"
          },
          "phoneNumberId": {
            "type": "string"
          },
          "displayPhoneNumber": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "webhookVerifyToken": {
            "type": "string"
          },
          "appSecret": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateApiKeyRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "CreateNoteRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "maxLength": 4000,
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "CreatePlatformUserRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "minLength": 12,
            "type": "string"
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateQueueRequest": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "key": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "autoAssign": {
            "type": "boolean"
          },
          "memberUserIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "timeZoneId": {
            "type": [
              "null",
              "string"
            ]
          },
          "outOfHoursMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "slaFirstResponseMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "csatEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "csatQuestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "businessHours": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BusinessHourSlot"
            }
          }
        }
      },
      "CreateRoleRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "permissions": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateSubscriptionRequest": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "secret": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateTemplateRequest": {
        "required": [
          "name",
          "category",
          "language",
          "components"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "components": {
            "type": "array"
          }
        }
      },
      "CreateTenantRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "CreateUserRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "type": "string"
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          },
          "roleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "DailyStat": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "inbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "EmbeddedSignupConfig": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "appId": {
            "type": [
              "null",
              "string"
            ]
          },
          "configId": {
            "type": [
              "null",
              "string"
            ]
          },
          "graphVersion": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EmbeddedSignupResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "accountId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "wabaId": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumberId": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayPhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "verifiedName": {
            "type": [
              "null",
              "string"
            ]
          },
          "qualityRating": {
            "type": [
              "null",
              "string"
            ]
          },
          "registered": {
            "type": "boolean"
          },
          "twoStepPin": {
            "type": [
              "null",
              "string"
            ]
          },
          "warning": {
            "type": [
              "null",
              "string"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FlowActionDto": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "method": {
            "type": [
              "null",
              "string"
            ]
          },
          "headersJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyTemplate": {
            "type": [
              "null",
              "string"
            ]
          },
          "taskTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "taskDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "taskPriority": {
            "type": [
              "null",
              "string"
            ]
          },
          "taskDueInHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "taskAssignedUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "FlowDefinitionRequest": {
        "required": [
          "name",
          "entryNodeKey",
          "nodes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "triggerKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isDefault": {
            "type": "boolean"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "entryNodeKey": {
            "type": "string"
          },
          "nodes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowNodeDto"
            }
          }
        }
      },
      "FlowNodeDto": {
        "required": [
          "key",
          "type"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "header": {
            "type": [
              "null",
              "string"
            ]
          },
          "footer": {
            "type": [
              "null",
              "string"
            ]
          },
          "listButtonText": {
            "type": [
              "null",
              "string"
            ]
          },
          "captureVariable": {
            "type": [
              "null",
              "string"
            ]
          },
          "autoTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowActionDto"
            }
          },
          "nextNodeKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "aiSystemPrompt": {
            "type": [
              "null",
              "string"
            ]
          },
          "aiModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "escalationKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "escalationQueueKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "useKnowledgeBase": {
            "type": "boolean"
          },
          "useFunctions": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowOptionDto"
            }
          }
        }
      },
      "FlowOptionDto": {
        "required": [
          "label",
          "action"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "action": {
            "type": "string"
          },
          "targetNodeKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "messageText": {
            "type": [
              "null",
              "string"
            ]
          },
          "webhookUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "targetQueueKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "autoTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "JsonElement": { },
      "KnowledgeDocumentRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 300,
            "minLength": 1,
            "type": "string"
          },
          "content": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": [
              "null",
              "string"
            ]
          },
          "isEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "LogEntryDetailResponse": {
        "type": "object",
        "properties": {
          "exception": {
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "level": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "eventId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "exceptionType": {
            "type": [
              "null",
              "string"
            ]
          },
          "traceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestPath": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "hasException": {
            "type": "boolean"
          }
        }
      },
      "LogEntryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "level": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "eventId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "exceptionType": {
            "type": [
              "null",
              "string"
            ]
          },
          "traceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestPath": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "hasException": {
            "type": "boolean"
          }
        }
      },
      "LogGroupCount": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "LoginRequest": {
        "required": [
          "tenantId",
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "refreshToken": {
            "type": "string"
          },
          "refreshExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/UserResponse"
          }
        }
      },
      "LogSeverity": {
        "type": "integer"
      },
      "LogSummaryResponse": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "format": "date-time"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "byLevel": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "topCategories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogGroupCount"
            }
          },
          "topExceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogGroupCount"
            }
          }
        }
      },
      "PagedContactsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactListItem"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PagedLogsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntryResponse"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PlatformLoginRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "QueueEntryStatus": {
        "type": "integer"
      },
      "QueueMemberResponse": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          },
          "roleName": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "assignedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "QueueResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "autoAssign": {
            "type": "boolean"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueueMemberResponse"
            }
          },
          "waitingCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "assignedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "timeZoneId": {
            "type": [
              "null",
              "string"
            ]
          },
          "outOfHoursMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "slaFirstResponseMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "csatEnabled": {
            "type": "boolean"
          },
          "csatQuestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "businessHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessHourSlot"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QuickReplyRequest": {
        "required": [
          "shortcut",
          "title",
          "body"
        ],
        "type": "object",
        "properties": {
          "shortcut": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RefreshRequest": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "RegisterRequest": {
        "required": [
          "organizationName",
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "organizationName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "type": "string"
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RegisterResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "refreshToken": {
            "type": "string"
          },
          "refreshExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/UserResponse"
          },
          "tenant": {
            "$ref": "#/components/schemas/TenantResponse"
          },
          "defaultApiKey": {
            "$ref": "#/components/schemas/ApiKeyCreatedResponse"
          }
        }
      },
      "ReportPaymentRequest": {
        "required": [
          "method",
          "reference"
        ],
        "type": "object",
        "properties": {
          "method": {
            "type": "string"
          },
          "reference": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "receiptStorageKey": {
            "maxLength": 512,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RoleResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SandboxInboundRequest": {
        "required": [
          "from"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          },
          "profileName": {
            "type": [
              "null",
              "string"
            ]
          },
          "buttonId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SandboxStatusRequest": {
        "required": [
          "messageId",
          "status"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "ScheduleCampaignRequest": {
        "type": "object",
        "properties": {
          "scheduledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SegmentRequest": {
        "required": [
          "accountId",
          "name"
        ],
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "includeTags": {
            "type": [
              "null",
              "string"
            ]
          },
          "excludeTags": {
            "type": [
              "null",
              "string"
            ]
          },
          "matchAllTags": {
            "type": "boolean"
          },
          "windowOpen": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "hasEmail": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "company": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "activeWithinDays": {
            "maximum": 3650,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SendContactsRequest": {
        "required": [
          "to",
          "contacts"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "contacts": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactCard"
            }
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendFlowRequest": {
        "required": [
          "to",
          "flowId",
          "body",
          "buttonText"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "flowId": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "buttonText": {
            "type": "string"
          },
          "header": {
            "type": [
              "null",
              "string"
            ]
          },
          "footer": {
            "type": [
              "null",
              "string"
            ]
          },
          "screenName": {
            "type": [
              "null",
              "string"
            ]
          },
          "initialData": {
            "type": [
              "null",
              "object"
            ]
          },
          "flowToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "flowAction": {
            "type": "string"
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendLocationRequest": {
        "required": [
          "to",
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "latitude": {
            "maximum": 90,
            "minimum": -90,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "longitude": {
            "maximum": 180,
            "minimum": -180,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendMediaFromStorageRequest": {
        "required": [
          "to",
          "type",
          "storageKey"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "storageKey": {
            "type": "string"
          },
          "mimeType": {
            "type": [
              "null",
              "string"
            ]
          },
          "caption": {
            "type": [
              "null",
              "string"
            ]
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendMediaLinkRequest": {
        "required": [
          "to",
          "type",
          "link"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "link": {
            "type": "string",
            "format": "uri"
          },
          "caption": {
            "type": [
              "null",
              "string"
            ]
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendProductRequest": {
        "required": [
          "to",
          "catalogId",
          "productRetailerIds"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "catalogId": {
            "type": "string"
          },
          "productRetailerIds": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "header": {
            "type": [
              "null",
              "string"
            ]
          },
          "footer": {
            "type": [
              "null",
              "string"
            ]
          },
          "sectionTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendReactionRequest": {
        "required": [
          "to",
          "messageId"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "messageId": {
            "type": "string"
          },
          "emoji": {
            "type": "string"
          }
        }
      },
      "SendSurveyRequest": {
        "required": [
          "accountId",
          "waId"
        ],
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "waId": {
            "type": "string"
          }
        }
      },
      "SendTemplateRequest": {
        "required": [
          "to",
          "templateName",
          "languageCode"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "templateName": {
            "type": "string"
          },
          "languageCode": {
            "type": "string"
          },
          "bodyParameters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "namedBodyParameters": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "header": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TemplateHeader"
              }
            ]
          },
          "buttons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateButtonParameter"
            }
          },
          "carousel": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateCarouselCard"
            }
          },
          "offerExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SendTextRequest": {
        "required": [
          "to",
          "text"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "previewUrl": {
            "type": "boolean"
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetTenantActiveRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StatisticsSummary": {
        "type": "object",
        "properties": {
          "accounts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contacts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalMessages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outbound": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "byStatus": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "lastDays": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyStat"
            }
          },
          "accounts_Breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountStat"
            }
          }
        }
      },
      "SubscriptionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastDeliveryAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastDeliveryStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "secret": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SurveyQuestionDto": {
        "required": [
          "text",
          "type"
        ],
        "type": "object",
        "properties": {
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scaleMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "scaleMax": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "required": {
            "type": "boolean"
          },
          "saveAsAttribute": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SurveyRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "introMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "thanksMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SurveyQuestionDto"
            }
          }
        }
      },
      "TagCount": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TemplateButtonParameter": {
        "required": [
          "subType",
          "value"
        ],
        "type": "object",
        "properties": {
          "index": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "subType": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "TemplateCarouselCard": {
        "type": "object",
        "properties": {
          "index": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "header": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TemplateHeader"
              }
            ]
          },
          "bodyParameters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "buttons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateButtonParameter"
            }
          }
        }
      },
      "TemplateHeader": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "text": {
            "type": [
              "null",
              "string"
            ]
          },
          "link": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaId": {
            "type": [
              "null",
              "string"
            ]
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TenantCreatedResponse": {
        "type": "object",
        "properties": {
          "tenant": {
            "$ref": "#/components/schemas/TenantResponse"
          },
          "defaultApiKey": {
            "$ref": "#/components/schemas/ApiKeyCreatedResponse"
          }
        }
      },
      "TenantPlanRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "monthlyMessageLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxAccounts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxKnowledgeDocuments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "enforceMonthlyLimit": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "TenantResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TransferRequest": {
        "type": "object",
        "properties": {
          "queueKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateBusinessProfileRequest": {
        "type": "object",
        "properties": {
          "about": {
            "maxLength": 139,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "maxLength": 512,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "maxLength": 256,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "maxLength": 128,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "vertical": {
            "maxLength": 64,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "websites": {
            "maxItems": 2,
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateContactRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "maxLength": 256,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "maxLength": 256,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "company": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "maxItems": 20,
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateQueueRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "null",
              "string"
            ]
          },
          "autoAssign": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "memberUserIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "timeZoneId": {
            "type": [
              "null",
              "string"
            ]
          },
          "outOfHoursMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "slaFirstResponseMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "csatEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "csatQuestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "businessHours": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BusinessHourSlot"
            }
          }
        }
      },
      "UpdateRoleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "permissions": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateTenantAiRequest": {
        "type": "object",
        "properties": {
          "openAiApiKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UserResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          },
          "roleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "roleName": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Agent"
    },
    {
      "name": "AiFunctions"
    },
    {
      "name": "ApiKeys"
    },
    {
      "name": "Auth"
    },
    {
      "name": "BillingAdmin"
    },
    {
      "name": "Campaigns"
    },
    {
      "name": "ChatAnalysis"
    },
    {
      "name": "Config"
    },
    {
      "name": "Contacts"
    },
    {
      "name": "ContactTasks"
    },
    {
      "name": "Files"
    },
    {
      "name": "Flows"
    },
    {
      "name": "Knowledge"
    },
    {
      "name": "Logs"
    },
    {
      "name": "Me"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Onboarding"
    },
    {
      "name": "PlatformAdmin"
    },
    {
      "name": "PlatformAuth"
    },
    {
      "name": "Platform"
    },
    {
      "name": "PlatformWebhooks"
    },
    {
      "name": "Queues"
    },
    {
      "name": "QuickReplies"
    },
    {
      "name": "Roles"
    },
    {
      "name": "Sandbox"
    },
    {
      "name": "Segments"
    },
    {
      "name": "Sessions"
    },
    {
      "name": "SocialWebhooks"
    },
    {
      "name": "Statistics"
    },
    {
      "name": "Storage"
    },
    {
      "name": "Surveys"
    },
    {
      "name": "TeamMetrics"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Tenants"
    },
    {
      "name": "Users"
    },
    {
      "name": "Waba"
    },
    {
      "name": "WebhookEvents"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "WebhookSubscriptions"
    }
  ]
}