{
  "x-generator": "NSwag v14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "Go Autonomous Analytics API v1",
    "description": "<h1><i>THIS API IS IN BETA</i></h1>\n\n<h2>Go Autonomous Analytics API</h2>\n\nThe endpoints are all paginated. The maximum number of items per page is 10000.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://analytics.goautonomous.io"
    }
  ],
  "paths": {
    "/v1/Admin/download_intent_changes": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Download annotator intent changes as CSV",
        "operationId": "Admin_DownloadIntentChanges",
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 1
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "orgId",
            "in": "query",
            "description": "Org for which to get intent changes. Leave empty for all orgs",
            "schema": {
              "type": "string",
              "default": ""
            },
            "x-position": 3
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDataOfTag"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get conversations",
        "operationId": "Conversations_GetConversations",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "Ascending",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "x-position": 3
          },
          {
            "name": "LastUpdatedAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "intentIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "x-position": 5
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 7
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDataOfConversation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get all events",
        "operationId": "Events_GetEvents",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "Ascending",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "x-position": 3
          },
          {
            "name": "LastUpdatedAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "intentIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "x-position": 5
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 7
          },
          {
            "name": "eventType",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 8
          },
          {
            "name": "mailStatus",
            "in": "query",
            "description": "Filter events by mail status. Accepted values: 'needs_action', 'completed', 'processing',\n'manual', 'confirming', 'simulating'\n            ",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 9
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDataOfEvent"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Events/stream": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Stream events with cursor-based pagination for high-performance processing of large datasets.\nThis endpoint is optimized for processing millions of events without memory issues or timeouts.",
        "operationId": "Events_StreamEvents",
        "parameters": [
          {
            "name": "intentIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "description": "Intent IDs to filter by",
            "schema": {
              "type": "array",
              "nullable": true,
              "items": {
                "type": "string"
              }
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Start date filter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "End date filter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "eventType",
            "in": "query",
            "description": "Event type filter",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "mailStatus",
            "in": "query",
            "description": "Mail status filter. Accepted values: 'needs_action', 'completed', 'processing', 'manual', 'confirming', 'simulating'",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 5
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Cursor token for pagination continuation",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "batchSize",
            "in": "query",
            "description": "Number of records per batch (default: 10000, max: 50000)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000
            },
            "x-position": 7
          },
          {
            "name": "LastUpdatedAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 8
          }
        ],
        "responses": {
          "200": {
            "description": "Stream of events with cursor information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamedEvents"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/FieldSettings": {
      "get": {
        "tags": [
          "FieldSettings"
        ],
        "summary": "Get all field settings",
        "operationId": "FieldSettings_GetFieldSettings",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FieldSettingsDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Intents": {
      "get": {
        "tags": [
          "Intents"
        ],
        "summary": "Get all intents",
        "operationId": "Intents_GetIntents",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Intent"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Mails": {
      "get": {
        "tags": [
          "Mails"
        ],
        "summary": "Bulk load mails. This endpoint is used to load a large number of mails into the system.\nUse the LastUpdated query parameter to use delta loading.",
        "operationId": "Mails_GetMails",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "Ascending",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "x-position": 3
          },
          {
            "name": "LastUpdatedAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "intentIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "x-position": 5
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 7
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDataOfMail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Mails/stream": {
      "get": {
        "tags": [
          "Mails"
        ],
        "summary": "Stream mails with cursor-based pagination for high-performance processing of large datasets.\nThis endpoint is optimized for processing millions of mails without memory issues or timeouts.",
        "operationId": "Mails_StreamMails",
        "parameters": [
          {
            "name": "intentIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "description": "Intent IDs to filter by",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "x-position": 1
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Start date filter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "End date filter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Cursor token for pagination continuation",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "batchSize",
            "in": "query",
            "description": "Number of records per batch (default: 10000, max: 50000)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000
            },
            "x-position": 5
          },
          {
            "name": "LastUpdatedAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 6
          }
        ],
        "responses": {
          "200": {
            "description": "Stream of mails with cursor information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamedMails"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/mails/query/download": {
      "post": {
        "tags": [
          "MailsQuery"
        ],
        "summary": "Download mails",
        "operationId": "MailsQuery_DownloadMails",
        "parameters": [
          {
            "name": "StartDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 1
          },
          {
            "name": "EndDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "UpdatedAfterDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "UpdatedBeforeDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          }
        ],
        "requestBody": {
          "x-name": "filterQuery",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilterQuery"
              }
            }
          },
          "required": true,
          "x-position": 5
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/mails/query": {
      "post": {
        "tags": [
          "MailsQuery"
        ],
        "summary": "Query mails",
        "operationId": "MailsQuery_QueryMails",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "Ascending",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "x-position": 3
          },
          {
            "name": "StartDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "EndDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 5
          },
          {
            "name": "UpdatedAfterDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "UpdatedBeforeDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 7
          },
          {
            "name": "searchString",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 9
          }
        ],
        "requestBody": {
          "x-name": "filterQuery",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilterQuery"
              }
            }
          },
          "required": true,
          "x-position": 8
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDataOfMail"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/mails/query/filters": {
      "get": {
        "tags": [
          "MailsQuery"
        ],
        "summary": "Get filter types",
        "operationId": "MailsQuery_GetFilterTypes",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableQueryFilters"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/mails/query/filters/message/{messageFilterType}": {
      "get": {
        "tags": [
          "MailsQuery"
        ],
        "summary": "Get Message Filter details",
        "operationId": "MailsQuery_GetMessageFilterDetails",
        "parameters": [
          {
            "name": "messageFilterType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueryFilterDetails"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/mails/query/filters/source/{sourceFilterType}": {
      "get": {
        "tags": [
          "MailsQuery"
        ],
        "summary": "Get Source Filter details",
        "operationId": "MailsQuery_GetSourceFilterDetails",
        "parameters": [
          {
            "name": "sourceFilterType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueryFilterDetails"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/products/download": {
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Download products",
        "operationId": "Products_DownloadProducts",
        "parameters": [
          {
            "name": "StartDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 1
          },
          {
            "name": "EndDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 2
          },
          {
            "name": "UpdatedAfterDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "UpdatedBeforeDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          }
        ],
        "requestBody": {
          "x-name": "filterQuery",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilterQuery"
              }
            }
          },
          "required": true,
          "x-position": 5
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    },
    "/v1/Tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Get all tags",
        "operationId": "Tags_GetTags",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "Ascending",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "x-position": 3
          },
          {
            "name": "LastUpdatedAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "intentIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "x-position": 5
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "nullable": true
            },
            "x-position": 7
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDataOfTag"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PaginatedDataOfTag": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalEntries": {
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "Tag": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mailEnvelopeId": {
            "type": "string",
            "format": "guid"
          },
          "tagId": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      },
      "PaginatedDataOfConversation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalEntries": {
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conversation"
            }
          }
        }
      },
      "Conversation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "externalConversationId": {
            "type": "string"
          },
          "externalMailId": {
            "type": "string"
          },
          "mailEnvelopeId": {
            "type": "string",
            "format": "guid"
          },
          "intentId": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "conversationIndex": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "PaginatedDataOfEvent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalEntries": {
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        }
      },
      "Event": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "eventId": {
            "type": "string",
            "format": "guid"
          },
          "mailEnvelopeId": {
            "type": "string",
            "format": "guid"
          },
          "eventType": {
            "type": "string"
          },
          "createdTime": {
            "type": "string",
            "format": "date-time"
          },
          "userId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "fieldName": {
            "type": "string"
          },
          "previousValue": {
            "type": "string",
            "nullable": true
          },
          "newValue": {
            "type": "string",
            "nullable": true
          },
          "changeType": {
            "type": "string"
          },
          "fieldType": {
            "type": "string"
          },
          "previousSource": {
            "type": "string"
          },
          "newSource": {
            "type": "string"
          },
          "instanceId": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "extractionId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "productLineNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "StreamedEvents": {
        "type": "object",
        "description": "Response wrapper for streaming events with cursor information",
        "additionalProperties": false,
        "properties": {
          "events": {
            "type": "array",
            "description": "The event data",
            "items": {
              "$ref": "#/components/schemas/EventResponse"
            }
          },
          "cursorToken": {
            "type": "string",
            "description": "Cursor token for continuing pagination from this point"
          },
          "processedCount": {
            "type": "integer",
            "description": "Total number of events processed up to this point",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean",
            "description": "Indicates if there are more events available"
          }
        }
      },
      "EventResponse": {
        "type": "object",
        "description": "Event DTO",
        "additionalProperties": false,
        "properties": {
          "eventId": {
            "type": "string",
            "description": "Event ID",
            "format": "guid"
          },
          "mailEnvelopeId": {
            "type": "string",
            "description": "MailEnvelopeId",
            "format": "guid"
          },
          "eventType": {
            "type": "string",
            "description": "EventType"
          },
          "createdTime": {
            "type": "string",
            "description": "CreatedTime",
            "format": "date-time"
          },
          "userId": {
            "type": "string",
            "description": "UserId",
            "format": "guid",
            "nullable": true
          },
          "fieldName": {
            "type": "string",
            "description": "FieldName"
          },
          "previousValue": {
            "type": "string",
            "description": "PreviousValue",
            "nullable": true
          },
          "newValue": {
            "type": "string",
            "description": "NewValue",
            "nullable": true
          },
          "changeType": {
            "type": "string",
            "description": "ChangeType"
          },
          "fieldType": {
            "type": "string",
            "description": "FieldType"
          },
          "previousSource": {
            "type": "string",
            "description": "PreviousSource"
          },
          "newSource": {
            "type": "string",
            "description": "NewSource"
          },
          "instanceId": {
            "type": "string",
            "description": "InstanceId"
          },
          "origin": {
            "type": "string",
            "description": "Origin"
          },
          "extractionId": {
            "type": "string",
            "description": "ExtractionId",
            "format": "guid",
            "nullable": true
          },
          "productLineNumber": {
            "type": "integer",
            "description": "ProductLineNumber",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "FieldSettingsDto": {
        "type": "object",
        "description": "1:1 mirror of the current field settings response shape.\nThis DTO exists to freeze the v1 contract (PowerBI is wired to it),\nso the domain object can evolve without changing the v1 payload.\n            ",
        "additionalProperties": false,
        "properties": {
          "field": {
            "type": "string"
          },
          "necessity": {
            "type": "string"
          },
          "fieldType": {
            "type": "string"
          },
          "minimumCertainty": {
            "type": "number",
            "format": "double"
          },
          "mailIntent": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "categoryName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Intent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "intentId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "firstLevelIntent": {
            "type": "string"
          },
          "secondLevelIntent": {
            "type": "string"
          },
          "thirdLevelIntent": {
            "type": "string"
          }
        }
      },
      "PaginatedDataOfMail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalEntries": {
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mail"
            }
          }
        }
      },
      "Mail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mailEnvelopeId": {
            "type": "string",
            "format": "guid"
          },
          "messageId": {
            "type": "string"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "intentId": {
            "type": "string"
          },
          "intent": {
            "type": "string"
          },
          "inbox": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusId": {
            "type": "string"
          },
          "sender": {
            "type": "string"
          },
          "assignedToName": {
            "type": "string",
            "nullable": true
          },
          "areaName": {
            "type": "string",
            "nullable": true
          },
          "senderName": {
            "type": "string",
            "nullable": true
          },
          "formats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "processingTimeInMs": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "replyTimeInMs": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "confirmTimeIntervalInMs": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lineCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "handling": {
            "type": "string",
            "nullable": true
          },
          "externalConversationId": {
            "type": "string",
            "nullable": true
          },
          "senderDomain": {
            "type": "string",
            "nullable": true
          },
          "classificationTimeElapsedInMs": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "messageLanguage": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "nullable": true
          },
          "crmReferenceId": {
            "type": "string",
            "nullable": true
          },
          "erpReferenceId": {
            "type": "string",
            "nullable": true
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "channel": {
            "type": "string"
          },
          "ongoing": {
            "type": "boolean"
          }
        }
      },
      "StreamedMails": {
        "type": "object",
        "description": "Response wrapper for streaming mails with cursor information",
        "additionalProperties": false,
        "properties": {
          "mails": {
            "type": "array",
            "description": "The mail data",
            "items": {
              "$ref": "#/components/schemas/Mail"
            }
          },
          "cursorToken": {
            "type": "string",
            "description": "Cursor token for continuing pagination from this point"
          },
          "processedCount": {
            "type": "integer",
            "description": "Total number of mails processed up to this point",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean",
            "description": "Indicates if there are more mails available"
          }
        }
      },
      "FilterQuery": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "intents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "formats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "handlings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "owners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "senders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "inboxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "areas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryFilterDetails"
            }
          }
        }
      },
      "QueryFilterDetails": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "filterType": {
            "$ref": "#/components/schemas/FilterType"
          },
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "FilterType": {
        "type": "string",
        "description": "",
        "x-enumNames": [
          "MessageFilter",
          "SourceFilter"
        ],
        "enum": [
          "MessageFilter",
          "SourceFilter"
        ]
      },
      "AvailableQueryFilters": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "messageFilterTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceFilterTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "API Key Authentication",
        "name": "x-api-key",
        "in": "header"
      },
      "Bearer": {
        "type": "http",
        "description": "Please enter valid token",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    },
    {
      "Bearer": []
    }
  ]
}