{
  "openapi": "3.0.0",
  "paths": {
    "/external/users": {
      "post": {
        "description": "Creates a new conversation user using either an email or phoneNumber.",
        "operationId": "ExternalApiUsersController_createConversationUser",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Provide the user details to create.",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateUserWithPhoneNumberBodyDTO"
                  },
                  {
                    "$ref": "#/components/schemas/CreateUserWithEmailBodyDTO"
                  },
                  {
                    "$ref": "#/components/schemas/CreateUserWithFkIdBodyDTO"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created a new conversation user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiUserResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "User already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestErrorDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Create a conversation user",
        "tags": [
          "Users",
          "Agent API Key"
        ]
      }
    },
    "/external/users/search": {
      "get": {
        "description": "Retrieves a user by their email, phone number or fkId, along with their conversation IDs for the current agent.",
        "operationId": "ExternalApiUsersController_findUserByContactInfo",
        "parameters": [
          {
            "name": "email",
            "required": false,
            "in": "query",
            "description": "User email",
            "schema": {
              "example": "test@test.com",
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "required": false,
            "in": "query",
            "description": "User phone number",
            "schema": {
              "example": "+1234567890",
              "type": "string"
            }
          },
          {
            "name": "fkId",
            "required": false,
            "in": "query",
            "description": "User fkId",
            "schema": {
              "example": "123456",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the user and conversation ids",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchConversationUserByContactsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestErrorDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "User not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Find user by contact information",
        "tags": [
          "Users",
          "Agent API Key"
        ]
      }
    },
    "/external/users/{id}": {
      "get": {
        "description": "Retrieves a conversation user by their unique identifier.",
        "operationId": "ExternalApiUsersController_getConversationUser",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the conversation user.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the conversation user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiUserResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "User not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get conversation user by ID",
        "tags": [
          "Users",
          "Agent API Key"
        ]
      },
      "delete": {
        "description": "Delete a conversation user by their unique identifier.",
        "operationId": "ExternalApiUsersController_deleteConversationUserById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the conversation user.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully delete the conversation user."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Conversation user not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Delete conversation user by ID",
        "tags": [
          "Users",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations": {
      "get": {
        "description": "Fetches a conversations by agent API key. The response includes the conversation details.",
        "operationId": "ExternalApiConversationsController_getConversations",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "orderBy",
            "required": false,
            "in": "query",
            "description": "Order by",
            "schema": {
              "enum": [
                "createdAt",
                "updatedAt"
              ],
              "type": "string"
            }
          },
          {
            "name": "orderDirection",
            "required": false,
            "in": "query",
            "description": "Order direction",
            "schema": {
              "enum": [
                "ASC",
                "DESC"
              ],
              "type": "string"
            }
          },
          {
            "name": "searchKeyword",
            "required": false,
            "in": "query",
            "description": "Search keyword in conversation title, summary, agent name, user first and last name, email and phone number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "Conversation user ID",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "required": false,
            "in": "query",
            "description": "Start date of conversation updatedAt.",
            "schema": {
              "format": "date-time",
              "example": "2024-03-20T12:00:00Z",
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "required": false,
            "in": "query",
            "description": "End date of conversation updatedAt.",
            "schema": {
              "format": "date-time",
              "example": "2024-03-20T12:00:00Z",
              "type": "string"
            }
          },
          {
            "name": "withFeedbacksOnly",
            "required": false,
            "in": "query",
            "description": "If true, returns conversations with at least one feedback",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully received conversations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetConversationWithFeedbacksResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get conversations",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      },
      "post": {
        "description": "Creates a new conversation . The response includes the conversation ID.",
        "operationId": "ExternalApiConversationsController_createConversation",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Details of the conversation to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created a new conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Create a new conversation",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      },
      "delete": {
        "description": "Delete all conversations associated with specified user in current agent.",
        "operationId": "ExternalApiConversationsController_deleteAllUsersConversations",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Provide user id.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteUserConversationsBodyDTO"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successfully delete all user conversations in current agent."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Delete all user conversations in current agent",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/states": {
      "get": {
        "description": "Fetches all available conversation states by agent API key.",
        "operationId": "ExternalApiConversationsController_getConversationStates",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successfully retrieved conversation states.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiGetConversationStateResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get conversation states",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/{id}": {
      "get": {
        "description": "Fetches a conversation by its unique ID. The response includes the conversation details.",
        "operationId": "ExternalApiConversationsController_getConversationById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to retrieve.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationWithFeedbacksResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get conversation by ID",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      },
      "put": {
        "description": "Updates an existing conversation by ID. Returns the updated conversation.",
        "operationId": "ExternalApiConversationsController_updateConversation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to update.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Details of the conversation to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversationBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated the conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Update conversation",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/start": {
      "post": {
        "description": "Start a new conversation using either an email, SMS or voice as the communication method. The response includes the conversation ID.",
        "operationId": "ExternalApiConversationsController_startConversation",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "discriminator": {
                  "propertyName": "channel",
                  "mapping": {
                    "email": "#/components/schemas/StartEmailConversationBodyDTO",
                    "sms": "#/components/schemas/StartSmsConversationBodyDTO",
                    "voice": "#/components/schemas/StartVoiceConversationBodyDTO"
                  }
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/StartEmailConversationBodyDTO"
                  },
                  {
                    "$ref": "#/components/schemas/StartSmsConversationBodyDTO"
                  },
                  {
                    "$ref": "#/components/schemas/StartVoiceConversationBodyDTO"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully start a new conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartConversationResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Start a new conversation",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/{id}/messages": {
      "get": {
        "description": "Fetches all messages associated with a specific conversation ID.",
        "operationId": "ExternalApiConversationsController_getConversationMessages",
        "parameters": [
          {
            "name": "shouldIncludeFeedbacks",
            "required": false,
            "in": "query",
            "description": "If true, returns conversation messages with feedbacks",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "orderDirection",
            "required": false,
            "in": "query",
            "description": "Message created at order direction. Default: ASC",
            "schema": {
              "enum": [
                "ASC",
                "DESC"
              ],
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to retrieve messages for.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved conversation messages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetConversationMessagesResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get conversation messages",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      },
      "post": {
        "description": "Send a new message to an agent using conversationId.",
        "operationId": "ExternalApiConversationsController_processMessage",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to send a message to.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Provide conversationId and message.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessMessageBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully processed a message to an agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessMessageResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Send a message to an agent",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/{id}/messages/async": {
      "post": {
        "description": "Send a new message to an agent using conversationId.",
        "operationId": "ExternalApiConversationsController_sendMessage",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to send a message to.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Provide conversationId and message.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully sent a message to an agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendMessageResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Send a message to an agent",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/{id}/messages/{questionMessageId}/response-on": {
      "get": {
        "description": "Fetches response on a specific conversation message ID.",
        "operationId": "ExternalApiConversationsController_getResponseOn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to retrieve message for.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          },
          {
            "name": "questionMessageId",
            "required": true,
            "in": "path",
            "description": "The ID of the question message to retrieve response for. (The message that the user sent to the AI agent)",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved conversation message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetResponseOnResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get response on",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/{id}/mode": {
      "put": {
        "description": "Updates conversation mode. Returns the updated conversation.",
        "operationId": "ExternalApiConversationsController_updateConversationMode",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to update.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Details of the conversation mode to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversationModeBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated the conversation mode.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Update conversation mode",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/conversations/{id}/send-manual-message": {
      "post": {
        "description": "Send a manual message to a user in a conversation that is in manual mode. Will fail if the conversation is not in manual mode or is a voice conversation.",
        "operationId": "ExternalApiConversationsController_sendManualMessage",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the conversation to send a message to the user.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Provide message to send to the user.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageToUserBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message sent successfully to the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendMessageResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Conversation must be in manual mode and not a voice conversation."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Send a manual message to a user",
        "tags": [
          "Conversations",
          "Agent API Key"
        ]
      }
    },
    "/external/prompts": {
      "post": {
        "description": "Processes a user prompt and returns an AI-generated response. The request must contain a valid API key.",
        "operationId": "ExternalApiPromptsController_processPrompt",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Provide the prompt text to process.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessPromptBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully processed the prompt and returned a response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessPromptResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Process a prompt request",
        "tags": [
          "Prompts",
          "Agent API Key"
        ]
      }
    },
    "/external/prompts/async": {
      "post": {
        "description": "Creates a user prompt and returns an ID. The request must contain a valid API key.",
        "operationId": "ExternalApiPromptsController_createPrompt",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Provide the prompt text to process.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePromptBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created the prompt and returned an ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePromptResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Create a prompt request",
        "tags": [
          "Prompts",
          "Agent API Key"
        ]
      }
    },
    "/external/prompts/{id}/response-on": {
      "get": {
        "description": "Returns a response on a user prompt by ID. The request must contain a valid API key.",
        "operationId": "ExternalApiPromptsController_getResponseOnPrompt",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Provide the prompt ID to process.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned a response on the prompt. Returns null if the prompt is not ready.",
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/GetResponseOnPromptResponseDTO"
                },
                {
                  "type": "null"
                }
              ]
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetResponseOnPromptResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get a response on prompt request",
        "tags": [
          "Prompts",
          "Agent API Key"
        ]
      }
    },
    "/external/agents": {
      "post": {
        "description": "Creates an agent by organization API key. The response includes the agent details.",
        "operationId": "ExternalApiAgentsController_createAgentByApiKey",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentByApiKeyBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created the agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAgentResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Organization-Secret-Key": []
          }
        ],
        "summary": "Create agent via organization API key",
        "tags": [
          "Organization API Key",
          "Agents"
        ]
      }
    },
    "/external/agents/{id}/users": {
      "get": {
        "description": "Fetches agent users by agent ID and Organization API key. The response includes the agent users details.",
        "operationId": "ExternalApiAgentsController_getOrganizationAgentUsers",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "orderBy",
            "required": false,
            "in": "query",
            "description": "Order by",
            "schema": {
              "enum": [
                "createdAt"
              ],
              "type": "string"
            }
          },
          {
            "name": "orderDirection",
            "required": false,
            "in": "query",
            "description": "Order direction",
            "schema": {
              "enum": [
                "ASC",
                "DESC"
              ],
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the agent.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved agent users.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganizationAgentUsersResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Organization-Secret-Key": []
          }
        ],
        "summary": "Get agent users by agent ID and Organization API key",
        "tags": [
          "Agents",
          "Organization API Key"
        ]
      }
    },
    "/external/agents/users": {
      "get": {
        "description": "Fetches agent users by Agent API key. The response includes the agent users details.",
        "operationId": "ExternalApiAgentsController_getAgentUsersByApiKey",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "orderBy",
            "required": false,
            "in": "query",
            "description": "Order by",
            "schema": {
              "enum": [
                "createdAt"
              ],
              "type": "string"
            }
          },
          {
            "name": "orderDirection",
            "required": false,
            "in": "query",
            "description": "Order direction",
            "schema": {
              "enum": [
                "ASC",
                "DESC"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved agent users.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgentByApiKeyResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get agent users by Agent API key",
        "tags": [
          "Agents",
          "Agent API Key"
        ]
      }
    },
    "/external/agents/by-api-key": {
      "get": {
        "description": "Fetches an agent by API key. The response includes the agent details.",
        "operationId": "ExternalApiAgentsController_getAgentByApiKey",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successfully retrieved the agent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgentByApiKeyResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get agent by API key",
        "tags": [
          "Agents",
          "Agent API Key"
        ]
      }
    },
    "/external/agents/statistic": {
      "get": {
        "description": "Fetches an agent statistic by API key. The response includes the agent statistic.",
        "operationId": "ExternalApiAgentsController_getAgentStatistic",
        "parameters": [
          {
            "name": "startDate",
            "required": false,
            "in": "query",
            "description": "Start date of statistics calculation.",
            "schema": {
              "format": "date-time",
              "example": "2024-03-20T12:00:00Z",
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "required": false,
            "in": "query",
            "description": "End date of statistics calculation.",
            "schema": {
              "format": "date-time",
              "example": "2024-03-20T12:00:00Z",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the agent statistic.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiGetAgentStatisticResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get agent statistic by API key",
        "tags": [
          "Agents",
          "Agent API Key"
        ]
      }
    },
    "/external/agents/webhooks": {
      "post": {
        "description": "Creates a new webhook for the agent identified by the API key.",
        "operationId": "ExternalApiAgentsController_createAgentWebhook",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentWebhookBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAgentWebhookResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Create agent webhook",
        "tags": [
          "Agents",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-files/upload": {
      "post": {
        "description": "This endpoint uploads an agent file associated with the provided API key.",
        "operationId": "ExternalApiAgentFilesController_uploadAgentFile",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Upload agent file",
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadAgentFileBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully uploaded agent file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadAgentFileResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Failed to upload agent file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestErrorDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Upload agent file",
        "tags": [
          "Agent-files",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-files/by-api-key": {
      "get": {
        "description": "This endpoint retrieves the agent files associated with the provided API key.",
        "operationId": "ExternalApiAgentFilesController_getAgentFilesByApiKey",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successfully retrieved agent files with details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgentFilesByApiKeyResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent files not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Get agent files by API key",
        "tags": [
          "Agent-files",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-files": {
      "delete": {
        "description": "This endpoint deletes the agent files by ids",
        "operationId": "ExternalApiAgentFilesController_deleteAgentFiles",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Request body for deleting agent files.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAgentFilesBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully deleted agent files."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Delete agent files by IDs",
        "tags": [
          "Agent-files",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-files/{id}/delete": {
      "delete": {
        "description": "This endpoint deletes the agent file by id",
        "operationId": "ExternalApiAgentFilesController_deleteAgentFile",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the agent file to delete.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted agent file."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent file not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Delete agent file by ID",
        "tags": [
          "Agent-files",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-files/{id}/delete-from-vector-store": {
      "delete": {
        "description": "This endpoint deletes the agent file from vector store by id",
        "operationId": "ExternalApiAgentFilesController_deleteAgentFileFromVectorStore",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the agent file to delete from vector store.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted agent file from vector store."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent file not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Delete agent file from vector store by ID",
        "tags": [
          "Agent-files",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-files/{id}/add-to-vector-store": {
      "put": {
        "description": "This endpoint adds the agent file to vector store by id",
        "operationId": "ExternalApiAgentFilesController_addFileToVectorStore",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The ID of the agent file to add to vector store.",
            "schema": {
              "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully added agent file to vector store."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Agent file not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Add agent file to vector store by ID",
        "tags": [
          "Agent-files",
          "Agent API Key"
        ]
      }
    },
    "/external/resource-usage": {
      "post": {
        "description": "Add new resource usage log using type and amount.",
        "operationId": "ExternalApiResourceConsumptionLogsController_createResourceConsumptionLog",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Provide type and amount of resource used.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResourceUsageLogsBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully add resource usage log."
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Add new resource usage log.",
        "tags": [
          "Resource Usage Logs",
          "Agent API Key"
        ]
      }
    },
    "/external/agent-roles/by-api-key": {
      "get": {
        "description": "Fetches agent roles by organization API key. The response includes agent roles details.",
        "operationId": "ExternalApiAgentRolesController_getAgentRolesByApiKey",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successfully retrieved agent roles.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgentRoleByApiKeyResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Organization-Secret-Key": []
          }
        ],
        "summary": "Get agent roles by organization API key",
        "tags": [
          "Organization API Key",
          "Agent Roles"
        ]
      }
    },
    "/external/organizations": {
      "post": {
        "description": "Creates an organization by admin API key. The response includes organization details.",
        "operationId": "ExternalApiOrganizationsController_createOrganizationByApiKey",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalApiCreateOrganizationByApiKeyBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiGetOrganizationResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityNotFoundErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Super-Admin-Secret-Key": []
          }
        ],
        "summary": "Create organization via admin API key",
        "tags": [
          "Super Admin API Key",
          "Organizations"
        ]
      }
    },
    "/external/subscriptions": {
      "get": {
        "description": "Fetches subscriptions by admin API key. The response includes the subscriptions details.",
        "operationId": "ExternalApiSubscriptionsController_findAllPaginated",
        "parameters": [
          {
            "name": "visibility",
            "required": false,
            "in": "query",
            "description": "Subscription visibility.",
            "schema": {
              "example": "public",
              "enum": [
                "public",
                "private"
              ],
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Subscription status.",
            "schema": {
              "example": "active",
              "enum": [
                "active",
                "inactive"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiSubscriptionResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Super-Admin-Secret-Key": []
          }
        ],
        "summary": "Get subscriptions by admin API key",
        "tags": [
          "Super Admin API Key",
          "Subscriptions"
        ]
      }
    },
    "/external/conversation-message-feedbacks": {
      "post": {
        "description": "Create or update existing conversation message feedback. The response includes the conversation message feedback.",
        "operationId": "ExternalApiConversationMessageFeedbacksController_createOrUpdateFeedback",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalApiCrateOrUpdateConversationMessageFeedbackBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Conversation message feedback successfully created or updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalApiCrateOrUpdateConversationMessageFeedbackResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agent-Secret-Key": []
          }
        ],
        "summary": "Create or update conversation message feedback",
        "tags": [
          "Conversation Message Feedbacks",
          "Agent API Key"
        ]
      }
    },
    "/external/platform-users": {
      "get": {
        "description": "Retrieves all platform users for the current organization.",
        "operationId": "ExternalApiPlatformUsersController_getAllOrganizationPlatformUsers",
        "parameters": [
          {
            "name": "role",
            "required": false,
            "in": "query",
            "description": "Platform user organization role.",
            "schema": {
              "example": "user",
              "enum": [
                "owner",
                "admin",
                "user",
                "copilot_user",
                "copilot_agent_user",
                "copilot_admin"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved all platform users for the current organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllOrganizationPlatformUsersResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key or secret key. Ensure that you are using a valid authentication key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenErrorDTO"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error occurred while processing the request. Please try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Organization-Secret-Key": []
          }
        ],
        "summary": "Get all platform users for the current organization.",
        "tags": [
          "Organization API Key",
          "Platform Users"
        ]
      }
    }
  },
  "info": {
    "title": "AI Agent API",
    "description": "API for creating users, conversations, and sending messages",
    "version": "1.0.0",
    "contact": {}
  },
  "tags": [],
  "servers": [
    {
      "url": "https://api.raia2.com",
      "description": "Production server"
    }
  ],
  "components": {
    "securitySchemes": {
      "Agent-Secret-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Agent-Secret-Key",
        "description": "Custom authentication header"
      },
      "Organization-Secret-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Organization-Secret-Key",
        "description": "Custom authentication header"
      },
      "Super-Admin-Secret-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Super-Admin-Secret-Key",
        "description": "Custom authentication header"
      }
    },
    "schemas": {
      "ForbiddenErrorDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "default": 403
          },
          "name": {
            "type": "object",
            "default": "FORBIDDEN_ERROR"
          },
          "message": {
            "type": "string",
            "default": "INVALID_CREDENTIALS"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "status",
          "name",
          "message",
          "details"
        ]
      },
      "InternalServerErrorDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "default": 500
          },
          "message": {
            "type": "string",
            "default": "Internal Server Error"
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "CreateUserWithPhoneNumberBodyDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "User first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "User last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "User context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "User source",
            "example": "webchat"
          },
          "fkUserId": {
            "type": "string",
            "description": "User fkUserId",
            "example": "123456"
          },
          "customData": {
            "type": "object",
            "description": "Conversation user custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "phoneNumber": {
            "type": "string",
            "description": "User phone number",
            "example": "+1234567890"
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          },
          "fkId": {
            "type": "string",
            "description": "User fkId",
            "example": "123456"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "phoneNumber"
        ]
      },
      "CreateUserWithEmailBodyDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "User first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "User last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "User context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "User source",
            "example": "webchat"
          },
          "fkUserId": {
            "type": "string",
            "description": "User fkUserId",
            "example": "123456"
          },
          "customData": {
            "type": "object",
            "description": "Conversation user custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          },
          "phoneNumber": {
            "type": "string",
            "description": "User phone number",
            "example": "+1234567890"
          },
          "fkId": {
            "type": "string",
            "description": "User fkId",
            "example": "123456"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "email"
        ]
      },
      "CreateUserWithFkIdBodyDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "User first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "User last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "User context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "User source",
            "example": "webchat"
          },
          "fkUserId": {
            "type": "string",
            "description": "User fkUserId",
            "example": "123456"
          },
          "customData": {
            "type": "object",
            "description": "Conversation user custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          },
          "phoneNumber": {
            "type": "string",
            "description": "User phone number",
            "example": "+1234567890"
          },
          "fkId": {
            "type": "string",
            "description": "User fkId",
            "example": "123456"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "fkId"
        ]
      },
      "ExternalApiUserResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "firstName": {
            "type": "string",
            "description": "User first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "User last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "User context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "User source",
            "example": "webchat"
          },
          "fkId": {
            "type": "string",
            "description": "User fkId",
            "example": "123456"
          },
          "fkUserId": {
            "type": "string",
            "description": "User fkUserId",
            "example": "123456"
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          },
          "phoneNumber": {
            "type": "string",
            "description": "User phone number",
            "example": "+1234567890"
          },
          "metadata": {
            "type": "object",
            "description": "Conversation user metadata",
            "example": {
              "customData": {
                "key1": "value1",
                "key2": "value2"
              }
            }
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName"
        ]
      },
      "BadRequestErrorDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "default": 500
          },
          "name": {
            "type": "object",
            "default": "BAD_REQUEST"
          },
          "message": {
            "type": "string",
            "default": "INVALID_REQUEST"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "status",
          "name",
          "message",
          "details"
        ]
      },
      "SearchConversationUserByContactsResponseDTO": {
        "type": "object",
        "properties": {
          "user": {
            "description": "User info",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalApiUserResponseDTO"
              }
            ]
          },
          "conversationIds": {
            "description": "Conversation ids",
            "example": [
              "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
              "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "user",
          "conversationIds"
        ]
      },
      "EntityNotFoundErrorDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "default": 404
          },
          "name": {
            "type": "object",
            "default": "ENTITY_NOT_FOUND_ERROR"
          },
          "message": {
            "type": "string",
            "default": "ENTITY_NOT_FOUND"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "status",
          "name",
          "message",
          "details"
        ]
      },
      "StartEmailConversationBodyDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "Conversation user first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Conversation user last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "Conversation user context",
            "example": "Support"
          },
          "conversationContext": {
            "type": "string",
            "description": "Conversation context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "Conversation user source",
            "example": "webchat"
          },
          "fkId": {
            "type": "string",
            "description": "Conversation user fkId",
            "example": "123456"
          },
          "fkUserId": {
            "type": "string",
            "description": "Conversation user fkUserId",
            "example": "123456"
          },
          "customData": {
            "type": "object",
            "description": "Conversation custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "authorId": {
            "type": "string",
            "description": "Author platform ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "channel": {
            "type": "string",
            "description": "Conversation user preferred channel",
            "example": "email",
            "enum": [
              "email"
            ]
          },
          "email": {
            "type": "string",
            "description": "Conversation user email",
            "example": "test@test.com"
          },
          "emailSubject": {
            "type": "string",
            "description": "Conversation user email subject",
            "example": "New Conversation"
          },
          "emailIntroduction": {
            "type": "string",
            "description": "Conversation user email introduction",
            "example": "New Conversation"
          },
          "includeSignatureInEmail": {
            "type": "boolean",
            "description": "Include email signature in the email",
            "example": false
          },
          "phoneNumber": {
            "type": "string",
            "description": "User phone number",
            "example": "+1234567890"
          },
          "resetConversation": {
            "type": "boolean",
            "description": "Archive current conversation and launch a new one",
            "default": false
          }
        },
        "required": [
          "firstName",
          "lastName",
          "channel",
          "email",
          "emailSubject",
          "emailIntroduction"
        ]
      },
      "StartSmsConversationBodyDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "Conversation user first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Conversation user last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "Conversation user context",
            "example": "Support"
          },
          "conversationContext": {
            "type": "string",
            "description": "Conversation context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "Conversation user source",
            "example": "webchat"
          },
          "fkId": {
            "type": "string",
            "description": "Conversation user fkId",
            "example": "123456"
          },
          "fkUserId": {
            "type": "string",
            "description": "Conversation user fkUserId",
            "example": "123456"
          },
          "customData": {
            "type": "object",
            "description": "Conversation custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "authorId": {
            "type": "string",
            "description": "Author platform ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "channel": {
            "type": "string",
            "description": "Conversation user preferred channel",
            "example": "sms",
            "enum": [
              "sms"
            ]
          },
          "phoneNumber": {
            "type": "string",
            "description": "Conversation user phone number",
            "example": "+1234567890"
          },
          "smsIntroduction": {
            "type": "string",
            "description": "Conversation user sms introduction",
            "example": "New Conversation"
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          },
          "resetConversation": {
            "type": "boolean",
            "description": "Archive current conversation and launch a new one",
            "default": false
          },
          "includeSignatureInSms": {
            "type": "boolean",
            "description": "Include signature in SMS",
            "default": false
          }
        },
        "required": [
          "firstName",
          "lastName",
          "channel",
          "phoneNumber",
          "smsIntroduction"
        ]
      },
      "StartVoiceConversationBodyDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "Conversation user first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Conversation user last name",
            "example": "Doe"
          },
          "context": {
            "type": "string",
            "description": "Conversation user context",
            "example": "Support"
          },
          "conversationContext": {
            "type": "string",
            "description": "Conversation context",
            "example": "Support"
          },
          "source": {
            "type": "string",
            "description": "Conversation user source",
            "example": "webchat"
          },
          "fkId": {
            "type": "string",
            "description": "Conversation user fkId",
            "example": "123456"
          },
          "fkUserId": {
            "type": "string",
            "description": "Conversation user fkUserId",
            "example": "123456"
          },
          "customData": {
            "type": "object",
            "description": "Conversation custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "authorId": {
            "type": "string",
            "description": "Author platform ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "channel": {
            "type": "string",
            "description": "Conversation user preferred channel",
            "example": "voice",
            "enum": [
              "voice"
            ]
          },
          "phoneNumber": {
            "type": "string",
            "description": "Conversation user phone number",
            "example": "+1234567890"
          },
          "firstMessage": {
            "type": "string",
            "description": "Assistant first message",
            "example": "Hello, how can I help you?"
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          }
        },
        "required": [
          "firstName",
          "lastName",
          "channel",
          "phoneNumber",
          "firstMessage"
        ]
      },
      "FeedbackResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Feedback ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "voteType": {
            "type": "string",
            "description": "Feedback vote type",
            "example": "down",
            "enum": [
              "up",
              "down"
            ]
          },
          "question": {
            "type": "string",
            "description": "Feedback question",
            "nullable": true
          },
          "answer": {
            "type": "string",
            "description": "Feedback answer",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Feedback comment",
            "nullable": true
          },
          "userEmail": {
            "type": "string",
            "description": "Email of the user who provided the feedback",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "Feedback created at",
            "example": "2023-01-01T00:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Feedback updated at",
            "example": "2023-01-01T00:00:00.000Z"
          }
        },
        "required": [
          "id",
          "voteType",
          "question",
          "answer",
          "comment",
          "createdAt",
          "updatedAt"
        ]
      },
      "ConversationWithFeedbacksResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "New conversation ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "conversationUserId": {
            "type": "string",
            "description": "Conversation user ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "title": {
            "type": "string",
            "description": "Conversation title",
            "example": "Conversation Title"
          },
          "score": {
            "type": "number",
            "description": "Conversation score",
            "example": 4
          },
          "summary": {
            "type": "string",
            "description": "Conversation summary",
            "example": "This is a summary of the conversation."
          },
          "aiConversationId": {
            "type": "string",
            "description": "AI conversation ID",
            "example": "conv_h435hi34h5i43i5sdfdfs"
          },
          "metadata": {
            "type": "object",
            "description": "Conversation metadata",
            "example": {
              "customData": {
                "key1": "value1",
                "key2": "value2"
              }
            }
          },
          "aiCallId": {
            "type": "string",
            "description": "AI call ID",
            "example": "call_h435hi34h5i43i5"
          },
          "mode": {
            "type": "string",
            "description": "Conversation mode",
            "example": "manual",
            "enum": [
              "manual",
              "ai"
            ]
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "user": {
            "description": "Conversation user",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalApiUserResponseDTO"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Date the conversation was created",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Date the conversation was updated",
            "format": "date-time"
          },
          "feedbacks": {
            "description": "Conversation feedbacks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedbackResponseDTO"
            }
          }
        },
        "required": [
          "id",
          "conversationUserId",
          "aiConversationId",
          "user",
          "createdAt",
          "updatedAt"
        ]
      },
      "GetConversationWithFeedbacksResponseDTO": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "number",
            "description": "Current page"
          },
          "pageSize": {
            "type": "number",
            "description": "Page size"
          },
          "totalItems": {
            "type": "number",
            "description": "Total items"
          },
          "totalPages": {
            "type": "number",
            "description": "Total pages"
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Has next page"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Has previous page"
          },
          "data": {
            "description": "List of conversations",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationWithFeedbacksResponseDTO"
            }
          }
        },
        "required": [
          "currentPage",
          "pageSize",
          "totalItems",
          "totalPages",
          "hasNextPage",
          "hasPreviousPage",
          "data"
        ]
      },
      "ExternalApiGetConversationStateResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Conversation state name"
          },
          "description": {
            "type": "string",
            "description": "Conversation state description",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Conversation state color hex",
            "nullable": true
          },
          "isPersistent": {
            "type": "boolean",
            "description": "True if conversation state is persistent"
          },
          "createdAt": {
            "type": "string",
            "description": "Conversation state created at",
            "example": "2023-01-01T00:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Conversation state created at",
            "example": "2023-01-01T00:00:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "color",
          "isPersistent",
          "createdAt",
          "updatedAt"
        ]
      },
      "StartConversationResponseDTO": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "description": "New conversation ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          }
        },
        "required": [
          "conversationId"
        ]
      },
      "BaseFeedbackResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Feedback ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "voteType": {
            "type": "string",
            "description": "Feedback vote type",
            "example": "down",
            "enum": [
              "up",
              "down"
            ]
          },
          "question": {
            "type": "string",
            "description": "Feedback question",
            "nullable": true
          },
          "answer": {
            "type": "string",
            "description": "Feedback answer",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Feedback comment",
            "nullable": true
          },
          "userEmail": {
            "type": "string",
            "description": "Email of the user who provided the feedback",
            "nullable": true
          }
        },
        "required": [
          "id",
          "voteType",
          "question",
          "answer",
          "comment"
        ]
      },
      "UrlCitationDTO": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "URL",
            "example": "https://example.com"
          },
          "title": {
            "type": "string",
            "description": "Title",
            "example": "Example"
          }
        },
        "required": [
          "url",
          "title"
        ]
      },
      "FileCitationDTO": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "File ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "filename": {
            "type": "string",
            "description": "Filename",
            "example": "example.txt"
          }
        },
        "required": [
          "fileId",
          "filename"
        ]
      },
      "FullAIResponseDTO": {
        "type": "object",
        "properties": {
          "reasoning": {
            "description": "Reasoning summaries",
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outputText": {
            "type": "string",
            "description": "Output text",
            "nullable": true
          },
          "urlCitations": {
            "description": "URL citations",
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UrlCitationDTO"
            }
          },
          "fileCitations": {
            "description": "File citations",
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileCitationDTO"
            }
          }
        }
      },
      "ConversationMessageResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Conversation message ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "message": {
            "type": "string",
            "description": "Conversation message content",
            "example": "Hello, how can I help you?"
          },
          "rawMessage": {
            "type": "string",
            "description": "Raw message content",
            "example": "Raw message example"
          },
          "conversationId": {
            "type": "string",
            "description": "Conversation ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "senderRole": {
            "type": "string",
            "enum": [
              "conversation_user",
              "assistant",
              "manual_assistant"
            ],
            "description": "Sender role in the conversation",
            "example": "conversation_user"
          },
          "conversationMessageId": {
            "type": "string",
            "description": "Question message ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "source": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "live_chat",
              "copilot",
              "api",
              "voice"
            ],
            "description": "Conversation source",
            "example": "api"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Message create date",
            "example": "2022-01-01T00:00:00.000Z"
          },
          "conversationMessageFeedbacks": {
            "description": "List of conversation message feedbacks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaseFeedbackResponseDTO"
            }
          },
          "fullAIResponse": {
            "description": "Full AI response",
            "allOf": [
              {
                "$ref": "#/components/schemas/FullAIResponseDTO"
              }
            ]
          }
        },
        "required": [
          "id",
          "message",
          "conversationId",
          "senderRole",
          "conversationMessageId",
          "source",
          "createdAt"
        ]
      },
      "GetConversationMessagesResponseDTO": {
        "type": "object",
        "properties": {
          "messages": {
            "description": "List of conversation messages",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationMessageResponseDTO"
            }
          }
        },
        "required": [
          "messages"
        ]
      },
      "SendMessageBodyDTO": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The message that the user sends to the AI agent",
            "example": "How does quantum entanglement work?"
          },
          "context": {
            "type": "string",
            "description": "Context of the message",
            "example": "User is asking about quantum physics."
          }
        },
        "required": [
          "message"
        ]
      },
      "SendMessageResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Conversation message ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "message": {
            "type": "string",
            "description": "Conversation message content",
            "example": "Hello, how can I help you?"
          },
          "rawMessage": {
            "type": "string",
            "description": "Raw message content",
            "example": "Raw message example"
          },
          "conversationId": {
            "type": "string",
            "description": "Conversation ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "senderRole": {
            "type": "string",
            "enum": [
              "conversation_user",
              "assistant",
              "manual_assistant"
            ],
            "description": "Sender role in the conversation",
            "example": "conversation_user"
          },
          "conversationMessageId": {
            "type": "string",
            "description": "Question message ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "source": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "live_chat",
              "copilot",
              "api",
              "voice"
            ],
            "description": "Conversation source",
            "example": "api"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Message create date",
            "example": "2022-01-01T00:00:00.000Z"
          },
          "conversationMessageFeedbacks": {
            "description": "List of conversation message feedbacks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaseFeedbackResponseDTO"
            }
          },
          "fullAIResponse": {
            "description": "Full AI response",
            "allOf": [
              {
                "$ref": "#/components/schemas/FullAIResponseDTO"
              }
            ]
          }
        },
        "required": [
          "id",
          "message",
          "conversationId",
          "senderRole",
          "conversationMessageId",
          "source",
          "createdAt"
        ]
      },
      "GetResponseOnResponseDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed"
            ],
            "description": "Response status",
            "example": "completed"
          },
          "message": {
            "description": "Response message",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ConversationMessageResponseDTO"
              }
            ]
          },
          "error": {
            "type": "string",
            "description": "Response error",
            "nullable": true
          }
        },
        "required": [
          "status",
          "message",
          "error"
        ]
      },
      "CreateConversationBodyDTO": {
        "type": "object",
        "properties": {
          "conversationUserId": {
            "type": "string",
            "description": "Conversation user ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "title": {
            "type": "string",
            "description": "Conversation title",
            "example": "New Conversation Title",
            "maxLength": 255
          },
          "context": {
            "type": "string",
            "description": "Conversation context",
            "example": "New conversation context",
            "maxLength": 256000
          },
          "customData": {
            "type": "object",
            "description": "Conversation custom data",
            "example": {
              "key1": "value1",
              "key2": "value2"
            }
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          }
        },
        "required": [
          "conversationUserId"
        ]
      },
      "ConversationResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "New conversation ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "conversationUserId": {
            "type": "string",
            "description": "Conversation user ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "title": {
            "type": "string",
            "description": "Conversation title",
            "example": "Conversation Title"
          },
          "score": {
            "type": "number",
            "description": "Conversation score",
            "example": 4
          },
          "summary": {
            "type": "string",
            "description": "Conversation summary",
            "example": "This is a summary of the conversation."
          },
          "aiConversationId": {
            "type": "string",
            "description": "AI conversation ID",
            "example": "conv_h435hi34h5i43i5sdfdfs"
          },
          "metadata": {
            "type": "object",
            "description": "Conversation metadata",
            "example": {
              "customData": {
                "key1": "value1",
                "key2": "value2"
              }
            }
          },
          "aiCallId": {
            "type": "string",
            "description": "AI call ID",
            "example": "call_h435hi34h5i43i5"
          },
          "mode": {
            "type": "string",
            "description": "Conversation mode",
            "example": "manual",
            "enum": [
              "manual",
              "ai"
            ]
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "user": {
            "description": "Conversation user",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalApiUserResponseDTO"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Date the conversation was created",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Date the conversation was updated",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "conversationUserId",
          "aiConversationId",
          "user",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProcessMessageBodyDTO": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The message that the user sends to the AI agent",
            "example": "How does quantum entanglement work?"
          },
          "context": {
            "type": "string",
            "description": "Context of the message",
            "example": "User is asking about quantum physics."
          }
        },
        "required": [
          "message"
        ]
      },
      "ProcessMessageResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Conversation message ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "message": {
            "type": "string",
            "description": "Conversation message content",
            "example": "Hello, how can I help you?"
          },
          "rawMessage": {
            "type": "string",
            "description": "Raw message content",
            "example": "Raw message example"
          },
          "conversationId": {
            "type": "string",
            "description": "Conversation ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "senderRole": {
            "type": "string",
            "enum": [
              "conversation_user",
              "assistant",
              "manual_assistant"
            ],
            "description": "Sender role in the conversation",
            "example": "conversation_user"
          },
          "conversationMessageId": {
            "type": "string",
            "description": "Question message ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "source": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "live_chat",
              "copilot",
              "api",
              "voice"
            ],
            "description": "Conversation source",
            "example": "api"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Message create date",
            "example": "2022-01-01T00:00:00.000Z"
          },
          "conversationMessageFeedbacks": {
            "description": "List of conversation message feedbacks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaseFeedbackResponseDTO"
            }
          },
          "fullAIResponse": {
            "description": "Full AI response",
            "allOf": [
              {
                "$ref": "#/components/schemas/FullAIResponseDTO"
              }
            ]
          }
        },
        "required": [
          "id",
          "message",
          "conversationId",
          "senderRole",
          "conversationMessageId",
          "source",
          "createdAt"
        ]
      },
      "DeleteUserConversationsBodyDTO": {
        "type": "object",
        "properties": {
          "conversationUserId": {
            "type": "string",
            "description": "Conversation user ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          }
        },
        "required": [
          "conversationUserId"
        ]
      },
      "UpdateConversationBodyDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Conversation title",
            "example": "Updated Conversation Title",
            "maxLength": 255
          },
          "context": {
            "type": "string",
            "description": "Conversation context",
            "example": "Updated conversation context",
            "maxLength": 256000
          },
          "status": {
            "type": "string",
            "description": "Conversation status",
            "example": "active",
            "enum": [
              "active",
              "inactive",
              "archived"
            ]
          },
          "conversationStateId": {
            "type": "string",
            "description": "Conversation state ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          }
        }
      },
      "UpdateConversationModeBodyDTO": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "description": "Conversation mode",
            "example": "ai",
            "enum": [
              "manual",
              "ai"
            ]
          }
        }
      },
      "SendMessageToUserBodyDTO": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The message that will be sent to the user",
            "example": "Your appointment has been confirmed for tomorrow at 2pm."
          },
          "conversationMessageId": {
            "type": "string",
            "description": "The ID of the conversation message that the user sent to the AI agent",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "authorId": {
            "type": "string",
            "description": "Author platform ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          }
        },
        "required": [
          "message"
        ]
      },
      "ProcessPromptBodyDTO": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "The question that the user sends to the AI agent",
            "example": "How does quantum entanglement work?"
          },
          "tokenTrackingId": {
            "type": "string",
            "description": "The ID of the token tracking",
            "example": "any-token-id-323jbb3242dwfwefew34234"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "ProcessPromptResponseDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed"
            ],
            "description": "Response status",
            "example": "completed"
          },
          "totalTokens": {
            "type": "number",
            "description": "Total number of tokens used for the request",
            "example": 12345,
            "nullable": true
          },
          "response": {
            "type": "string",
            "description": "The AI-generated response to the user prompt",
            "example": "The theory of relativity explains how time and space are linked",
            "nullable": true
          },
          "error": {
            "type": "string",
            "description": "Response error",
            "nullable": true
          }
        },
        "required": [
          "status",
          "totalTokens",
          "response",
          "error"
        ]
      },
      "CreatePromptBodyDTO": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "The question that the user sends to the AI agent",
            "example": "How does quantum entanglement work?"
          },
          "tokenTrackingId": {
            "type": "string",
            "description": "The ID of the token tracking",
            "example": "any-token-id-323jbb3242dwfwefew34234"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "CreatePromptResponseDTO": {
        "type": "object",
        "properties": {
          "promptId": {
            "type": "string",
            "description": "The ID of the prompt",
            "example": "1234567890"
          }
        },
        "required": [
          "promptId"
        ]
      },
      "GetResponseOnPromptResponseDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed"
            ],
            "description": "Response status",
            "example": "completed"
          },
          "totalTokens": {
            "type": "number",
            "description": "Total number of tokens used for the request",
            "example": 12345,
            "nullable": true
          },
          "response": {
            "type": "string",
            "description": "The AI-generated response to the user prompt",
            "example": "The theory of relativity explains how time and space are linked",
            "nullable": true
          },
          "error": {
            "type": "string",
            "description": "Response error",
            "nullable": true
          }
        },
        "required": [
          "status",
          "totalTokens",
          "response",
          "error"
        ]
      },
      "BaseSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          }
        },
        "required": [
          "systemName",
          "status"
        ]
      },
      "LiveChatSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "color": {
            "type": "string",
            "description": "Color of the chat widget.",
            "example": "#5D6169"
          },
          "intro": {
            "type": "string",
            "description": "Default introduction message.",
            "example": "Hello, how can I help you?"
          },
          "links": {
            "description": "List of links to be displayed in the chat widget.",
            "example": [
              "https://example.com/link1",
              "https://example.com/link2"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disclaimer": {
            "type": "string",
            "description": "Disclaimer message.",
            "example": "This is a disclaimer message."
          },
          "suggestions": {
            "description": "List of suggestions for the chat widget.",
            "example": [
              "Suggestion 1",
              "Suggestion 2",
              "Suggestion 3"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "whitelistedIps": {
            "description": "List of IP addresses that are whitelisted.",
            "example": [
              "192.168.1.1",
              "192.168.1.2"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "restrictedCountries": {
            "description": "List of countries that are restricted.",
            "example": [
              "US",
              "CA",
              "GB"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "systemName",
          "status"
        ]
      },
      "SmsSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number associated with the sms skill.",
            "example": "+1234567890"
          },
          "defaultSmsIntroduction": {
            "type": "object",
            "description": "Default SMS introduction.",
            "example": "Welcome to our service!"
          },
          "smsSignature": {
            "type": "object",
            "description": "SMS signature.",
            "example": "Thank you for your message!"
          }
        },
        "required": [
          "systemName",
          "status",
          "phoneNumber"
        ]
      },
      "EmailSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "email": {
            "type": "string",
            "description": "Email address associated with the email skill.",
            "example": "email@gmail.com"
          },
          "senderName": {
            "type": "string",
            "description": "Name of the email sender.",
            "example": "John Doe"
          },
          "defaultSubject": {
            "type": "string",
            "description": "Email subject.",
            "example": "Subject of the email"
          },
          "defaultEmailIntroduction": {
            "type": "string",
            "description": "Default email introduction.",
            "example": "Welcome to our service!"
          },
          "emailSignature": {
            "type": "string",
            "description": "Default email closing.",
            "example": "Thank you for your email!"
          }
        },
        "required": [
          "systemName",
          "status",
          "email"
        ]
      },
      "WebhookResponseDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the webhook.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "title": {
            "type": "string",
            "description": "Webhook title.",
            "example": "Webhook Title"
          },
          "description": {
            "type": "string",
            "description": "Webhook description.",
            "example": "Description of the webhook"
          },
          "url": {
            "type": "string",
            "description": "Webhook URL.",
            "example": "https://example.com/webhook-url"
          },
          "triggerCondition": {
            "type": "string",
            "description": "Webhook trigger condition.",
            "enum": [
              "each_message",
              "end_dialog",
              "start_dialog",
              "chat_currently_unavailable",
              "auto_archive_conversation"
            ],
            "example": "each_message"
          },
          "headers": {
            "type": "object",
            "description": "Webhook headers.",
            "example": {
              "Authorization": "Bearer token",
              "Content-Type": "application/json"
            }
          }
        },
        "required": [
          "status",
          "title",
          "description",
          "url",
          "triggerCondition"
        ]
      },
      "WebhookSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "name": {
            "type": "string",
            "description": "Webhook skill name.",
            "example": "Webhook Skill Name"
          },
          "description": {
            "type": "string",
            "description": "Webhook skill description.",
            "example": "Description of the webhook skill"
          },
          "webhooks": {
            "description": "Webhook configs.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookResponseDTO"
            }
          }
        },
        "required": [
          "systemName",
          "status",
          "name",
          "description",
          "webhooks"
        ]
      },
      "FunctionsSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          }
        },
        "required": [
          "systemName",
          "status"
        ]
      },
      "ScoringSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "scoringPrompt": {
            "type": "string",
            "description": "Scoring prompt.",
            "example": "Please rate the service from 1 to 5."
          }
        },
        "required": [
          "systemName",
          "status"
        ]
      },
      "APISkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "apiKey": {
            "type": "string",
            "description": "API key for the skill.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          }
        },
        "required": [
          "systemName",
          "status",
          "apiKey"
        ]
      },
      "VoiceSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "vApiAssistantId": {
            "type": "string",
            "description": "Vapi assistant id."
          },
          "vApiPhoneNumberId": {
            "type": "string",
            "description": "Vapi phone number id."
          }
        },
        "required": [
          "systemName",
          "status",
          "vApiAssistantId",
          "vApiPhoneNumberId"
        ]
      },
      "MemorySkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "type": {
            "type": "string",
            "enum": [
              "BY_USER",
              "BY_AGENT"
            ],
            "description": "Memory skill type."
          },
          "retentionDuration": {
            "type": "number",
            "description": "Retention duration."
          }
        },
        "required": [
          "systemName",
          "status",
          "type",
          "retentionDuration"
        ]
      },
      "ReportSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "DAILY",
              "WEEKLY",
              "MONTHLY"
            ],
            "description": "Agent report frequency."
          },
          "emails": {
            "description": "Agent report emails.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "systemName",
          "status",
          "frequency",
          "emails"
        ]
      },
      "ScrapingConfigResponseDTO": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Scraping url."
          },
          "startCrawledAt": {
            "format": "date-time",
            "type": "string",
            "description": "Start crawled at.",
            "nullable": true
          },
          "endCrawledAt": {
            "format": "date-time",
            "type": "string",
            "description": "End crawled at.",
            "nullable": true
          },
          "crawlerType": {
            "type": "string",
            "enum": [
              "FIRECRAWL",
              "APIFY"
            ],
            "description": "Crawler type."
          },
          "crawlFormat": {
            "type": "string",
            "enum": [
              "JSON",
              "MARKDOWN",
              "HTML",
              "CONTENT"
            ],
            "description": "Crawl format."
          },
          "excludeUrls": {
            "description": "Excluded urls.",
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pageLimit": {
            "type": "number",
            "description": "Page limit."
          },
          "maxDepth": {
            "type": "number",
            "description": "Max depth."
          },
          "frequency": {
            "type": "string",
            "enum": [
              "manual",
              "daily",
              "weekly",
              "monthly"
            ],
            "description": "Scraping frequency."
          },
          "autoUpload": {
            "type": "boolean",
            "description": "Is auto upload enabled."
          },
          "crawlingStatus": {
            "type": "string",
            "enum": [
              "not_started",
              "in_progress",
              "completed",
              "failed",
              "canceled"
            ],
            "description": "Crawling status."
          }
        },
        "required": [
          "url",
          "startCrawledAt",
          "endCrawledAt",
          "crawlerType",
          "crawlFormat",
          "excludeUrls",
          "pageLimit",
          "maxDepth",
          "frequency",
          "autoUpload",
          "crawlingStatus"
        ]
      },
      "ScrapingSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "scrapingConfigs": {
            "description": "Agent scraping configs.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScrapingConfigResponseDTO"
            }
          }
        },
        "required": [
          "systemName",
          "status",
          "scrapingConfigs"
        ]
      },
      "NotificationSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          }
        },
        "required": [
          "systemName",
          "status"
        ]
      },
      "ExternalRetrieverConfig": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "description": "External retriever API key."
          },
          "indexName": {
            "type": "string",
            "description": "External retriever index name."
          },
          "host": {
            "type": "string",
            "description": "External retriever host."
          },
          "fieldName": {
            "type": "string",
            "description": "External retriever field name."
          },
          "namespace": {
            "type": "string",
            "description": "External retriever namespace."
          },
          "topK": {
            "type": "number",
            "description": "External retriever topK."
          },
          "isEmbedded": {
            "type": "boolean",
            "description": "External retriever is embedded."
          },
          "dimensions": {
            "type": "number",
            "description": "External retriever dimensions."
          },
          "model": {
            "type": "string",
            "enum": [
              "text-embedding-ada-002",
              "text-embedding-3-large",
              "text-embedding-3-small"
            ],
            "description": "External retriever model."
          }
        },
        "required": [
          "apiKey",
          "indexName",
          "host",
          "fieldName",
          "namespace",
          "topK",
          "isEmbedded"
        ]
      },
      "ExternalRetrieverResponseDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Retriever name."
          },
          "type": {
            "type": "string",
            "enum": [
              "pinecone"
            ],
            "description": "Retriever type."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "description": "Retriever status."
          },
          "config": {
            "description": "Retriever config.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalRetrieverConfig"
              }
            ]
          }
        },
        "required": [
          "name",
          "type",
          "status",
          "config"
        ]
      },
      "ExternalRetrieversSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "externalRetrievers": {
            "description": "External retrievers.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalRetrieverResponseDTO"
            }
          }
        },
        "required": [
          "systemName",
          "status",
          "externalRetrievers"
        ]
      },
      "WebSearchSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "webSearchServiceType": {
            "type": "string",
            "enum": [
              "openai"
            ],
            "description": "Web search service."
          },
          "prompt": {
            "type": "string",
            "description": "Web search prompt."
          }
        },
        "required": [
          "systemName",
          "status",
          "webSearchServiceType",
          "prompt"
        ]
      },
      "FeedbackSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "period": {
            "type": "string",
            "enum": [
              "last_30_days",
              "last_60_days",
              "last_90_days",
              "all_time"
            ],
            "description": "Feedback period."
          },
          "autoUpload": {
            "type": "boolean",
            "description": "Is auto upload enabled."
          },
          "generationMode": {
            "type": "string",
            "enum": [
              "manual",
              "auto"
            ],
            "description": "Feedback generation mode."
          }
        },
        "required": [
          "systemName",
          "status",
          "period",
          "autoUpload",
          "generationMode"
        ]
      },
      "EscalationRecipientsResponseDTO": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "sms",
              "email",
              "webhook"
            ],
            "description": "Notification channel."
          },
          "value": {
            "type": "string",
            "description": "Notification recipient."
          },
          "headers": {
            "type": "object",
            "description": "Optional headers to be sent with the webhook",
            "example": {
              "Authorization": "Bearer token"
            }
          }
        },
        "required": [
          "channel",
          "value"
        ]
      },
      "EscalationResponseDTO": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string",
            "description": "Escalation topic."
          },
          "escalationPrompt": {
            "type": "string",
            "description": "Escalation prompt."
          },
          "autoChangeConversationMode": {
            "type": "boolean",
            "description": "Is auto change conversation mode to manual enabled?"
          },
          "response": {
            "type": "string",
            "description": "Message to the user in case of escalation."
          },
          "recipients": {
            "description": "Send notification to the recipients in case of escalation.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalationRecipientsResponseDTO"
            }
          }
        },
        "required": [
          "topic",
          "escalationPrompt",
          "autoChangeConversationMode",
          "response",
          "recipients"
        ]
      },
      "EscalationSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "escalations": {
            "description": "Escalations.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalationResponseDTO"
            }
          }
        },
        "required": [
          "systemName",
          "status",
          "escalations"
        ]
      },
      "CalCalendarConfig": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "cal"
            ],
            "description": "Calendar type."
          },
          "apiKey": {
            "type": "string",
            "description": "Cal calendar API key."
          },
          "prompt": {
            "type": "string",
            "description": "Cal calendar prompt."
          }
        },
        "required": [
          "type",
          "apiKey",
          "prompt"
        ]
      },
      "CalendarSkillResponseDTO": {
        "type": "object",
        "properties": {
          "systemName": {
            "type": "string",
            "description": "System name of the skill.",
            "enum": [
              "LIVE_CHAT",
              "SMS",
              "EMAIL",
              "WEBHOOK",
              "FUNCTION",
              "SCORING",
              "API",
              "VOICE",
              "MEMORY",
              "AGENT_REPORT",
              "SCRAPING",
              "NOTIFICATIONS",
              "EXTERNAL_RETRIEVERS",
              "WEB_SEARCH",
              "FEEDBACK",
              "ESCALATION",
              "CALENDAR",
              "AUDITOR",
              "COPILOT",
              "MCP"
            ],
            "example": "AGENT_SKILL_SYSTEM_NAME"
          },
          "status": {
            "type": "string",
            "description": "Status of the email skill.",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CalCalendarConfig"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "cal": "#/components/schemas/CalCalendarConfig"
              }
            },
            "allOf": [
              {
                "$ref": "#/components/schemas/CalCalendarConfig"
              }
            ]
          }
        },
        "required": [
          "systemName",
          "status",
          "config"
        ]
      },
      "CreateAgentByApiKeyBodyDTO": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string",
            "description": "Agent role ID.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the agent.",
            "example": "My agent"
          },
          "publicName": {
            "type": "string",
            "description": "Public name of the agent.",
            "example": "My agent"
          },
          "description": {
            "type": "string",
            "description": "Description of the agent.",
            "example": "My agent description"
          },
          "instructions": {
            "type": "string",
            "description": "Instructions of the agent.",
            "example": "My agent instructions"
          },
          "model": {
            "type": "string",
            "enum": [
              "gpt-4.1",
              "gpt-4.1-nano",
              "gpt-4.1-mini",
              "gpt-4-turbo",
              "gpt-3.5-turbo",
              "o1",
              "o3-mini",
              "gpt-5-nano",
              "gpt-5",
              "gpt-5-mini",
              "gpt-5.1",
              "gpt-5.2"
            ],
            "description": "Model of the agent.",
            "example": "gpt-5.1"
          },
          "topP": {
            "type": "number",
            "description": "TopP of the agent.",
            "example": 1
          },
          "temperature": {
            "type": "number",
            "description": "Temperature of the agent.",
            "example": 1
          },
          "isFileSearchEnabled": {
            "type": "boolean",
            "description": "Is file search enabled by default.",
            "example": false
          },
          "isCodeInterpreterEnabled": {
            "type": "boolean",
            "description": "Is code interpreter enabled by default.",
            "example": false
          },
          "fileSearchMaxNumResults": {
            "type": "number",
            "description": "File search max number of results. Required when isFileSearchEnabled is true.",
            "example": 10,
            "default": 10
          },
          "reasoningEffort": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "xhigh",
              "minimal",
              "none"
            ],
            "description": "Reasoning effort of the agent. Required only when mode is reasoning.",
            "example": "medium"
          },
          "isApiSkillEnabled": {
            "type": "boolean",
            "description": "Is agent API skill enabled by default.",
            "example": true
          },
          "isOutputJsonSchemaEnabled": {
            "type": "boolean",
            "description": "Is output JSON schema enabled by default.",
            "example": false
          },
          "outputJsonSchema": {
            "type": "string",
            "description": "Output JSON schema of the agent.",
            "example": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}}}"
          },
          "tags": {
            "description": "Tags of the agent.",
            "example": "[\"Sales\", \"Support\"]",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "roleId",
          "name",
          "publicName",
          "outputJsonSchema",
          "tags"
        ]
      },
      "AIConfigResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Agent AI config ID.",
            "example": "asst_1234567890"
          },
          "model": {
            "type": "string",
            "enum": [
              "gpt-4.1",
              "gpt-4.1-nano",
              "gpt-4.1-mini",
              "gpt-4-turbo",
              "gpt-3.5-turbo",
              "o1",
              "o3-mini",
              "gpt-5-nano",
              "gpt-5",
              "gpt-5-mini",
              "gpt-5.1",
              "gpt-5.2"
            ],
            "description": "Open AI model.",
            "example": "gpt-5.1"
          },
          "temperature": {
            "type": "number",
            "description": "OpenAI temperature.",
            "example": 1
          },
          "topP": {
            "type": "number",
            "description": "OpenAI top_p.",
            "example": 1
          },
          "instructions": {
            "type": "string",
            "description": "OpenAI instructions."
          },
          "isCodeInterpreterEnabled": {
            "type": "boolean",
            "description": "Is code interpreter enabled.",
            "example": true
          },
          "isFileSearchEnabled": {
            "type": "boolean",
            "description": "Is file search enabled.",
            "example": true
          },
          "fileSearchMaxNumResults": {
            "type": "number",
            "description": "File search max number of results.",
            "example": 10
          },
          "reasoningEffort": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "xhigh",
              "minimal",
              "none"
            ],
            "description": "Reasoning effort of the agent.",
            "example": "medium",
            "nullable": true
          },
          "isOutputJsonSchemaEnabled": {
            "type": "boolean",
            "description": "Is output JSON schema enabled.",
            "example": true
          },
          "outputJsonSchema": {
            "type": "string",
            "description": "Output JSON schema of the agent.",
            "example": "{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\"}}}"
          }
        },
        "required": [
          "id",
          "model",
          "temperature",
          "topP",
          "instructions",
          "isCodeInterpreterEnabled",
          "isFileSearchEnabled",
          "fileSearchMaxNumResults",
          "outputJsonSchema"
        ]
      },
      "CreateAgentResponseDTO": {
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the organization.",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string",
            "description": "Name of the organization."
          },
          "id": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the agent.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the agent."
          },
          "publicName": {
            "type": "string",
            "description": "Public name of the agent."
          },
          "role": {
            "type": "string",
            "description": "Role of the agent."
          },
          "description": {
            "type": "string",
            "description": "Description of the agent."
          },
          "vectorStoreId": {
            "type": "string",
            "description": "OpenAI vector store ID.",
            "example": "vs_1234567890"
          },
          "aiConfig": {
            "description": "Agent AI config.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AIConfigResponseDTO"
              }
            ]
          },
          "avatarUrl": {
            "type": "string",
            "description": "Avatar URL of the agent.",
            "example": "https://example.com/avatar.jpg"
          },
          "status": {
            "type": "string",
            "description": "Status of the agent.",
            "enum": [
              "active",
              "inactive",
              "draft"
            ]
          },
          "tags": {
            "description": "Agent tags.",
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BaseSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/LiveChatSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/SmsSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/EmailSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/WebhookSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/FunctionsSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ScoringSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/APISkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/VoiceSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/MemorySkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ReportSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ScrapingSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/NotificationSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ExternalRetrieversSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/WebSearchSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/FeedbackSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/EscalationSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/CalendarSkillResponseDTO"
                }
              ]
            },
            "description": "List of skills associated with the agent."
          },
          "agentApiKey": {
            "type": "string",
            "description": "Agent API key if API skill is enabled",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          }
        },
        "required": [
          "organizationId",
          "organizationName",
          "id",
          "name",
          "publicName",
          "role",
          "vectorStoreId",
          "aiConfig",
          "status",
          "skills"
        ]
      },
      "GetOrganizationAgentUsersResponseDTO": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "number",
            "description": "Current page"
          },
          "pageSize": {
            "type": "number",
            "description": "Page size"
          },
          "totalItems": {
            "type": "number",
            "description": "Total items"
          },
          "totalPages": {
            "type": "number",
            "description": "Total pages"
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Has next page"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Has previous page"
          },
          "data": {
            "description": "List of users",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalApiUserResponseDTO"
            }
          }
        },
        "required": [
          "currentPage",
          "pageSize",
          "totalItems",
          "totalPages",
          "hasNextPage",
          "hasPreviousPage",
          "data"
        ]
      },
      "GetAgentByApiKeyResponseDTO": {
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the organization.",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string",
            "description": "Name of the organization."
          },
          "id": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the agent.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the agent."
          },
          "publicName": {
            "type": "string",
            "description": "Public name of the agent."
          },
          "role": {
            "type": "string",
            "description": "Role of the agent."
          },
          "description": {
            "type": "string",
            "description": "Description of the agent."
          },
          "vectorStoreId": {
            "type": "string",
            "description": "OpenAI vector store ID.",
            "example": "vs_1234567890"
          },
          "aiConfig": {
            "description": "Agent AI config.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AIConfigResponseDTO"
              }
            ]
          },
          "avatarUrl": {
            "type": "string",
            "description": "Avatar URL of the agent.",
            "example": "https://example.com/avatar.jpg"
          },
          "status": {
            "type": "string",
            "description": "Status of the agent.",
            "enum": [
              "active",
              "inactive",
              "draft"
            ]
          },
          "tags": {
            "description": "Agent tags.",
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BaseSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/LiveChatSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/SmsSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/EmailSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/WebhookSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/FunctionsSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ScoringSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/APISkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/VoiceSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/MemorySkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ReportSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ScrapingSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/NotificationSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/ExternalRetrieversSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/WebSearchSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/FeedbackSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/EscalationSkillResponseDTO"
                },
                {
                  "$ref": "#/components/schemas/CalendarSkillResponseDTO"
                }
              ]
            },
            "description": "List of skills associated with the agent."
          }
        },
        "required": [
          "organizationId",
          "organizationName",
          "id",
          "name",
          "publicName",
          "role",
          "vectorStoreId",
          "aiConfig",
          "status",
          "skills"
        ]
      },
      "ExternalApiGetAgentStatisticResponseDTO": {
        "type": "object",
        "properties": {
          "tokensUsed": {
            "type": "number",
            "description": "Total number of tokens used by the agent in the given period."
          },
          "tokensPerConversation": {
            "type": "number",
            "description": "Number of tokens per conversations by the agent in the given period."
          },
          "vapiSecondsUsed": {
            "type": "number",
            "description": "Total number of vapi seconds used by the agent in the given period."
          },
          "averageCallDuration": {
            "type": "number",
            "description": "Number of vapi seconds per conversations by the agent in the given period."
          },
          "smsUsed": {
            "type": "number",
            "description": "Total number of sms used by the agent in the given period."
          },
          "smsPerConversation": {
            "type": "number",
            "description": "Number of sms per conversations by the agent in the given period."
          },
          "emailsUsed": {
            "type": "number",
            "description": "Total number of emails used by the agent in the given period."
          },
          "emailsPerConversation": {
            "type": "number",
            "description": "Number of emails per conversations by the agent in the given period."
          }
        },
        "required": [
          "tokensUsed",
          "tokensPerConversation",
          "vapiSecondsUsed",
          "averageCallDuration",
          "smsUsed",
          "smsPerConversation",
          "emailsUsed",
          "emailsPerConversation"
        ]
      },
      "CreateAgentWebhookBodyDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the webhook",
            "example": "My Webhook"
          },
          "description": {
            "type": "string",
            "description": "Description of the webhook",
            "example": "This webhook is triggered when a message is received"
          },
          "url": {
            "type": "string",
            "description": "URL where the webhook will be sent",
            "example": "https://api.example.com/webhook"
          },
          "triggerCondition": {
            "type": "string",
            "description": "Condition that triggers the webhook",
            "enum": [
              "each_message",
              "end_dialog",
              "start_dialog",
              "chat_currently_unavailable",
              "auto_archive_conversation"
            ],
            "example": "each_message"
          },
          "headers": {
            "type": "object",
            "description": "Optional headers to be sent with the webhook",
            "example": {
              "Authorization": "Bearer token"
            }
          }
        },
        "required": [
          "title",
          "description",
          "url",
          "triggerCondition"
        ]
      },
      "CreateAgentWebhookResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the created webhook",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "agentId": {
            "type": "string",
            "description": "ID of the agent this webhook belongs to",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "title": {
            "type": "string",
            "description": "Title of the webhook",
            "example": "My Webhook"
          },
          "description": {
            "type": "string",
            "description": "Description of the webhook",
            "example": "This webhook is triggered when a message is received"
          },
          "url": {
            "type": "string",
            "description": "URL where the webhook will be sent",
            "example": "https://api.example.com/webhook"
          },
          "triggerCondition": {
            "type": "string",
            "description": "Condition that triggers the webhook",
            "enum": [
              "each_message",
              "end_dialog",
              "start_dialog",
              "chat_currently_unavailable",
              "auto_archive_conversation"
            ],
            "example": "each_message"
          },
          "headers": {
            "type": "object",
            "description": "Optional headers to be sent with the webhook",
            "example": {
              "Authorization": "Bearer token"
            }
          },
          "status": {
            "type": "string",
            "description": "Status of the webhook",
            "enum": [
              "active",
              "inactive"
            ],
            "example": "active"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Creation timestamp",
            "example": "2024-03-20T12:00:00Z"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Last update timestamp",
            "example": "2024-03-20T12:00:00Z"
          }
        },
        "required": [
          "id",
          "agentId",
          "title",
          "description",
          "url",
          "triggerCondition",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "UploadAgentFileBodyDTO": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "The file to upload"
          },
          "autoAddToVectorStore": {
            "type": "boolean",
            "example": true,
            "description": "Indicates whether to automatically add the file to the vector store."
          }
        },
        "required": [
          "file"
        ]
      },
      "UploadAgentFileResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the agent file",
            "format": "uuid"
          },
          "fileName": {
            "type": "string",
            "example": "example.txt",
            "description": "Name of the agent file"
          },
          "url": {
            "type": "string",
            "example": "https://example.com/file.txt",
            "description": "URL of the agent file"
          },
          "createdAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Creation date of the agent file",
            "format": "date-time"
          },
          "vectorStoreFileId": {
            "type": "string",
            "example": "file-123e4567-e89b",
            "description": "Unique identifier for the vector store file"
          },
          "isUploadedToVectorStore": {
            "type": "boolean",
            "example": true,
            "description": "Indicates the file’s upload status to the vector store. A null value suggests a possible vector store error.",
            "nullable": true
          },
          "uploadedToVectorStoreAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Date when the file was uploaded to the vector store",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "fileName",
          "url",
          "createdAt"
        ]
      },
      "GetAgentFilesByApiKeyResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the agent file",
            "format": "uuid"
          },
          "fileName": {
            "type": "string",
            "example": "example.txt",
            "description": "Name of the agent file"
          },
          "url": {
            "type": "string",
            "example": "https://example.com/file.txt",
            "description": "URL of the agent file"
          },
          "createdAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Creation date of the agent file",
            "format": "date-time"
          },
          "vectorStoreFileId": {
            "type": "string",
            "example": "file-123e4567-e89b",
            "description": "Unique identifier for the vector store file"
          },
          "isUploadedToVectorStore": {
            "type": "boolean",
            "example": true,
            "description": "Indicates the file’s upload status to the vector store. A null value suggests a possible vector store error.",
            "nullable": true
          },
          "uploadedToVectorStoreAt": {
            "type": "string",
            "example": "2023-10-01T12:00:00Z",
            "description": "Date when the file was uploaded to the vector store",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "fileName",
          "url",
          "createdAt"
        ]
      },
      "DeleteAgentFilesBodyDTO": {
        "type": "object",
        "properties": {
          "fileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "fileIds"
        ]
      },
      "CreateResourceUsageLogsBodyDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "OPENAI_TOKENS",
              "VAPI_SECONDS"
            ],
            "description": "The type of resource consumed",
            "example": "OPENAI_TOKENS"
          },
          "amount": {
            "type": "number",
            "description": "The amount of resource consumed.",
            "example": 4567
          }
        },
        "required": [
          "type",
          "amount"
        ]
      },
      "GetAgentRoleByApiKeyResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique identifier for the agent role.",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Name of the agent role."
          },
          "description": {
            "type": "string",
            "description": "Description of the agent role."
          }
        },
        "required": [
          "id",
          "name",
          "description"
        ]
      },
      "ExternalApiInviteUserBodyDTO": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Invited user email.",
            "example": "test@test.com",
            "minLength": 4,
            "maxLength": 255
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "user",
              "copilot_user",
              "copilot_agent_user",
              "copilot_admin"
            ],
            "description": "Invited user role.",
            "example": "user"
          }
        },
        "required": [
          "email",
          "role"
        ]
      },
      "ExternalApiCreateOrganizationByApiKeyBodyDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Organization name.",
            "example": "New Organization",
            "maxLength": 255
          },
          "users": {
            "description": "List of invited users.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalApiInviteUserBodyDTO"
            }
          },
          "subscriptionId": {
            "type": "string",
            "description": "Subscription ID. Subscribes to trial subscription if undefined.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "endedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Subscription end date. Applies if \"subscriptionId\" is specified and this subscription is not a trial.",
            "example": "2024-03-20T12:00:00Z"
          }
        },
        "required": [
          "name",
          "users"
        ]
      },
      "ExternalApiCreatedByDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the creator.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "description": "Email of the creator.",
            "example": "test@test.com"
          },
          "firstName": {
            "type": "string",
            "description": "First name of the creator.",
            "example": "UserFN"
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the creator.",
            "example": "UserLN"
          }
        },
        "required": [
          "id",
          "email",
          "firstName",
          "lastName"
        ]
      },
      "ExternalApiSubscriptionResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Subscription ID.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "description": "Subscription title.",
            "example": "Subscription title"
          },
          "description": {
            "type": "string",
            "description": "Subscription description.",
            "example": "Subscription description"
          },
          "agentsAmount": {
            "type": "number",
            "description": "Number of agents in the subscription.",
            "example": 10
          },
          "tokensAmountPerMonth": {
            "type": "number",
            "description": "OpenAI tokens amount in the subscription.",
            "example": 1000000
          },
          "secondsAmountPerMonth": {
            "type": "number",
            "description": "Vapi seconds amount in the subscription.",
            "example": 1000000
          },
          "smsAmountPerMonth": {
            "type": "number",
            "description": "Number of SMS in the subscription.",
            "example": 1000
          },
          "emailsAmountPerMonth": {
            "type": "number",
            "description": "Number of Emails in the subscription.",
            "example": 1000
          },
          "usersWithAccessAmount": {
            "type": "number",
            "description": "Number of users in organizations.",
            "example": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "description": "Subscription status.",
            "example": "active"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ],
            "description": "Subscription visibility.",
            "example": "public"
          },
          "isTrial": {
            "type": "boolean",
            "description": "True if subscription is trial.",
            "example": false
          },
          "createdBy": {
            "description": "Created by.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalApiCreatedByDTO"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Creation timestamp",
            "example": "2024-03-20T12:00:00Z"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Last update timestamp",
            "example": "2024-03-20T12:00:00Z"
          },
          "organizationsCount": {
            "type": "number",
            "description": "Number of organizations with current subscription.",
            "example": 100
          },
          "price": {
            "type": "number",
            "description": "Subscription in cent.",
            "example": 49900
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "agentsAmount",
          "tokensAmountPerMonth",
          "secondsAmountPerMonth",
          "smsAmountPerMonth",
          "emailsAmountPerMonth",
          "usersWithAccessAmount",
          "status",
          "visibility",
          "isTrial",
          "createdBy",
          "createdAt",
          "updatedAt",
          "organizationsCount",
          "price"
        ]
      },
      "ExternalApiGetOrganizationResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Organization ID.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Organization name.",
            "example": "New Organization"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "archived",
              "blocked"
            ],
            "description": "Organization status.",
            "example": "active"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Creation timestamp",
            "example": "2024-03-20T12:00:00Z"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Last update timestamp",
            "example": "2024-03-20T12:00:00Z"
          },
          "createdBy": {
            "description": "Created by.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalApiCreatedByDTO"
              }
            ]
          },
          "subscription": {
            "description": "Organization subscription.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalApiSubscriptionResponseDTO"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "createdAt",
          "updatedAt",
          "createdBy",
          "subscription"
        ]
      },
      "ExternalApiCrateOrUpdateConversationMessageFeedbackBodyDTO": {
        "type": "object",
        "properties": {
          "conversationMessageId": {
            "type": "string",
            "description": "Unique identifier for the conversation message.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "description": "Unique identifier for the user.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "voteType": {
            "type": "string",
            "enum": [
              "up",
              "down"
            ],
            "description": "Feedback vote type. Up if feedback is positive",
            "example": "up"
          },
          "question": {
            "type": "string",
            "description": "Your question."
          },
          "answer": {
            "type": "string",
            "description": "Agent answer."
          },
          "comment": {
            "type": "string",
            "description": "Comment for your feedback.",
            "example": "Awesome :)"
          }
        },
        "required": [
          "conversationMessageId",
          "userId",
          "voteType",
          "question"
        ]
      },
      "ExternalApiCrateOrUpdateConversationMessageFeedbackResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the conversation message feedback.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "conversationMessageId": {
            "type": "string",
            "description": "Unique identifier for the conversation message.",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "voteType": {
            "type": "string",
            "enum": [
              "up",
              "down"
            ],
            "description": "Feedback vote type. Up if feedback is positive",
            "example": "up"
          },
          "question": {
            "type": "string",
            "description": "Your question.",
            "nullable": true
          },
          "answer": {
            "type": "string",
            "description": "Agent answer.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "Feedback created at",
            "example": "2023-01-01T00:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Feedback updated at",
            "example": "2023-01-01T00:00:00.000Z"
          },
          "comment": {
            "type": "string",
            "description": "Comment for your feedback.",
            "example": "Awesome :)",
            "nullable": true
          }
        },
        "required": [
          "id",
          "conversationMessageId",
          "voteType",
          "question",
          "answer",
          "createdAt",
          "updatedAt",
          "comment"
        ]
      },
      "GetAllOrganizationPlatformUsersResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User ID",
            "example": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
          },
          "email": {
            "type": "string",
            "description": "User email",
            "example": "test@test.com"
          },
          "phoneNumber": {
            "type": "string",
            "description": "User phone number",
            "example": "+1234567890"
          },
          "firstName": {
            "type": "string",
            "description": "User first name",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "User last name",
            "example": "Doe"
          }
        },
        "required": [
          "id",
          "email",
          "phoneNumber",
          "firstName",
          "lastName"
        ]
      }
    }
  }
}