{
  "openapi": "3.1.0",
  "info": {
    "title": "heymilo Red API",
    "description": "Candidate fraud detection — interview integrity scans.",
    "version": "0.1.0"
  },
  "paths": {
    "/v1/scans": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Create Scan",
        "operationId": "create_scan_v1_scans_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScanRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public"
        ],
        "summary": "List Scans",
        "operationId": "list_scans_v1_scans_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483648,
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "metadata_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metadata Key"
            }
          },
          {
            "name": "metadata_value",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metadata Value"
            }
          },
          {
            "name": "set_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Set Id"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/{scan_id}": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get Scan",
        "operationId": "get_scan_v1_scans__scan_id__get",
        "parameters": [
          {
            "name": "scan_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Scan Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scans/{scan_id}/export": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Export Scan",
        "operationId": "export_scan_v1_scans__scan_id__export_get",
        "parameters": [
          {
            "name": "scan_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Scan Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Export Scan V1 Scans  Scan Id  Export Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sets": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Create Set",
        "operationId": "create_set_v1_sets_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalysisSetIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisSetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public"
        ],
        "summary": "List Sets",
        "operationId": "list_sets_v1_sets_get",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AnalysisSetResponse"
                  },
                  "title": "Response List Sets V1 Sets Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sets/tags": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "List Workspace Tags",
        "operationId": "list_workspace_tags_v1_sets_tags_get",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "Response List Workspace Tags V1 Sets Tags Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sets/{set_id}": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get Set",
        "operationId": "get_set_v1_sets__set_id__get",
        "parameters": [
          {
            "name": "set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Set Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisSetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public"
        ],
        "summary": "Patch Set",
        "operationId": "patch_set_v1_sets__set_id__patch",
        "parameters": [
          {
            "name": "set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Set Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalysisSetPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisSetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "public"
        ],
        "summary": "Delete Set",
        "operationId": "delete_set_v1_sets__set_id__delete",
        "parameters": [
          {
            "name": "set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Set Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sets/{set_id}/scans": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Update Set Scans",
        "operationId": "update_set_scans_v1_sets__set_id__scans_post",
        "parameters": [
          {
            "name": "set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Set Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetScansRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalysisSetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public"
        ],
        "summary": "List Set Scans",
        "operationId": "list_set_scans_v1_sets__set_id__scans_get",
        "parameters": [
          {
            "name": "set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Set Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2147483648,
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Create Webhook Endpoint",
        "operationId": "create_webhook_endpoint_v1_webhook_endpoints_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public"
        ],
        "summary": "List Webhook Endpoints",
        "operationId": "list_webhook_endpoints_v1_webhook_endpoints_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEndpointResponse"
                  },
                  "title": "Response List Webhook Endpoints V1 Webhook Endpoints Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}": {
      "delete": {
        "tags": [
          "public"
        ],
        "summary": "Delete Webhook Endpoint",
        "operationId": "delete_webhook_endpoint_v1_webhook_endpoints__endpoint_id__delete",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}/test": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Test Webhook Endpoint",
        "operationId": "test_webhook_endpoint_v1_webhook_endpoints__endpoint_id__test_post",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/public/scans/{token}": {
      "get": {
        "tags": [
          "public-share"
        ],
        "summary": "Get Shared Scan",
        "operationId": "get_shared_scan_public_scans__token__get",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedScanReport"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/taxonomy-templates": {
      "get": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "List Templates",
        "operationId": "list_templates_v1_taxonomy_templates_get",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaxonomyTemplateResponse"
                  },
                  "title": "Response List Templates V1 Taxonomy Templates Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "Create Template",
        "operationId": "create_template_v1_taxonomy_templates_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxonomyTemplateIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyTemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/taxonomy-templates/{template_id}": {
      "get": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "Get Template",
        "operationId": "get_template_v1_taxonomy_templates__template_id__get",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyTemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "Patch Template",
        "operationId": "patch_template_v1_taxonomy_templates__template_id__patch",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxonomyTemplatePatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyTemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "Delete Template",
        "operationId": "delete_template_v1_taxonomy_templates__template_id__delete",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/taxonomy-templates/{template_id}/clone": {
      "post": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "Clone Template",
        "operationId": "clone_template_v1_taxonomy_templates__template_id__clone_post",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TaxonomyTemplateCloneRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Req"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyTemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/taxonomy-templates/from-scan/{scan_id}": {
      "post": {
        "tags": [
          "taxonomy-templates"
        ],
        "summary": "Create From Scan",
        "operationId": "create_from_scan_v1_taxonomy_templates_from_scan__scan_id__post",
        "parameters": [
          {
            "name": "scan_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Scan Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxonomyTemplateFromScanRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyTemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Access": {
        "properties": {
          "visibility": {
            "type": "string",
            "enum": [
              "workspace",
              "restricted"
            ],
            "title": "Visibility",
            "default": "workspace"
          },
          "member_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Member Ids"
          }
        },
        "type": "object",
        "title": "Access"
      },
      "AnalysisSetIn": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          },
          "default_template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Template Id"
          },
          "access": {
            "$ref": "#/components/schemas/Access"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AnalysisSetIn"
      },
      "AnalysisSetPatch": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "default_template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Template Id"
          },
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Access"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "AnalysisSetPatch"
      },
      "AnalysisSetResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "workspace_id": {
            "type": "string",
            "title": "Workspace Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          },
          "default_template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Template Id"
          },
          "access": {
            "$ref": "#/components/schemas/Access"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "rollups": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SetRollupResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "name",
          "description",
          "tags",
          "default_template_id",
          "access",
          "created_by",
          "created_at"
        ],
        "title": "AnalysisSetResponse"
      },
      "CreateScanRequest": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Metadata"
          },
          "video_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video Url",
            "description": "HTTPS (presigned) video URL"
          },
          "audio_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audio Url"
          },
          "transcript": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TranscriptSegmentIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript"
          },
          "participants": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ParticipantDeclarationIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Participants"
          },
          "set_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Set Ids"
          },
          "taxonomy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxonomyInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "result_version": {
            "type": "string",
            "enum": [
              "red.v1",
              "red.v2"
            ],
            "title": "Result Version",
            "default": "red.v1"
          },
          "detection_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detection Config",
            "description": "Which detection categories/checks to run, e.g. {\"categories\": {\"identity\": {\"enabled\": true}}, \"checks\": {\"ai_generated_response\": {\"enabled\": false}}}. Omit to run a full scan (all categories)."
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "Your identifier for this scan"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url",
            "description": "Optional per-request webhook URL — the scan result is POSTed here on completion. Falls back to the workspace's default webhook endpoints if omitted."
          },
          "sandbox_scenario": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "clean",
                  "flagged",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Sandbox Scenario",
            "description": "Sandbox keys only. Picks the canned outcome; the media is never analyzed. Defaults to clean."
          }
        },
        "type": "object",
        "title": "CreateScanRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "MediaStatus": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "ready",
          "failed",
          "skipped"
        ],
        "title": "MediaStatus"
      },
      "ParticipantDeclarationIn": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "reference_image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Image Url"
          }
        },
        "type": "object",
        "title": "ParticipantDeclarationIn"
      },
      "ScanListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ScanResponse"
            },
            "type": "array",
            "title": "Data"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "type": "object",
        "required": [
          "data",
          "has_more"
        ],
        "title": "ScanListResponse"
      },
      "ScanResponse": {
        "properties": {
          "scan_id": {
            "type": "string",
            "title": "Scan Id"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "status": {
            "$ref": "#/components/schemas/ScanStatus"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Metadata"
          },
          "participants": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Participants"
          },
          "set_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Set Ids"
          },
          "media_status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "progress": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress"
          },
          "progress_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress Status"
          },
          "last_heartbeat_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Heartbeat At"
          },
          "billable_minutes": {
            "type": "integer",
            "title": "Billable Minutes"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "Scan result in the scan's result_version: red.v2 findings by detection profile, or the red.v1 verdict and findings. Null until the scan completes."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "livemode": {
            "type": "boolean",
            "title": "Livemode",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "scan_id",
          "external_id",
          "status",
          "metadata",
          "media_status",
          "progress",
          "progress_status",
          "last_heartbeat_at",
          "billable_minutes",
          "error",
          "created_at",
          "completed_at"
        ],
        "title": "ScanResponse"
      },
      "ScanStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "PROCESSING",
          "COMPLETED",
          "FAILED"
        ],
        "title": "ScanStatus"
      },
      "SetFindingRollup": {
        "properties": {
          "check_id": {
            "type": "string",
            "title": "Check Id"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "severities": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Severities"
          }
        },
        "type": "object",
        "required": [
          "check_id",
          "count"
        ],
        "title": "SetFindingRollup"
      },
      "SetRollupResponse": {
        "properties": {
          "scan_count": {
            "type": "integer",
            "title": "Scan Count"
          },
          "risk_distribution": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Risk Distribution"
          },
          "needs_review_count": {
            "type": "integer",
            "title": "Needs Review Count"
          },
          "top_findings": {
            "items": {
              "$ref": "#/components/schemas/SetFindingRollup"
            },
            "type": "array",
            "title": "Top Findings"
          },
          "billable_minutes": {
            "type": "integer",
            "title": "Billable Minutes"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "scan_count",
          "risk_distribution",
          "needs_review_count",
          "top_findings",
          "billable_minutes"
        ],
        "title": "SetRollupResponse"
      },
      "SetScansRequest": {
        "properties": {
          "scan_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scan Ids"
          },
          "action": {
            "type": "string",
            "enum": [
              "add",
              "remove"
            ],
            "title": "Action",
            "default": "add"
          }
        },
        "type": "object",
        "title": "SetScansRequest"
      },
      "SharedEvidenceArtifact": {
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "title": "SharedEvidenceArtifact"
      },
      "SharedEvidenceWindow": {
        "properties": {
          "start_sec": {
            "type": "number",
            "title": "Start Sec"
          },
          "end_sec": {
            "type": "number",
            "title": "End Sec"
          }
        },
        "type": "object",
        "required": [
          "start_sec",
          "end_sec"
        ],
        "title": "SharedEvidenceWindow"
      },
      "SharedFinding": {
        "properties": {
          "finding_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finding Id"
          },
          "vector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Id"
          },
          "check_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Check Id"
          },
          "severity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "evidence": {
            "$ref": "#/components/schemas/SharedFindingEvidence"
          },
          "metadata": {
            "$ref": "#/components/schemas/SharedFindingMetadata"
          }
        },
        "type": "object",
        "title": "SharedFinding"
      },
      "SharedFindingEvidence": {
        "properties": {
          "windows": {
            "items": {
              "$ref": "#/components/schemas/SharedEvidenceWindow"
            },
            "type": "array",
            "title": "Windows"
          },
          "quotes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Quotes"
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/SharedEvidenceArtifact"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "time_refs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SharedTimeRef"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Refs"
          },
          "evidence_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Basis"
          }
        },
        "type": "object",
        "title": "SharedFindingEvidence"
      },
      "SharedFindingMetadata": {
        "properties": {
          "evidence_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Basis"
          },
          "delay_sec": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delay Sec"
          },
          "question_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Question Text"
          },
          "presence_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence State"
          }
        },
        "type": "object",
        "title": "SharedFindingMetadata"
      },
      "SharedMedia": {
        "properties": {
          "raw_video_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw Video Url"
          }
        },
        "type": "object",
        "title": "SharedMedia"
      },
      "SharedParticipant": {
        "properties": {
          "participant_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Participant Ref"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "role_guess": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Guess"
          },
          "talk_time_sec": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Talk Time Sec"
          },
          "discovered": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discovered"
          },
          "declared": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Declared"
          },
          "identity": {
            "$ref": "#/components/schemas/SharedParticipantIdentity"
          }
        },
        "type": "object",
        "title": "SharedParticipant"
      },
      "SharedParticipantIdentity": {
        "properties": {
          "matched": {
            "type": "boolean",
            "title": "Matched",
            "default": false
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "anomalies": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Anomalies"
          }
        },
        "type": "object",
        "title": "SharedParticipantIdentity"
      },
      "SharedResult": {
        "properties": {
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "verdict": {
            "$ref": "#/components/schemas/SharedVerdict"
          },
          "taxonomy": {
            "$ref": "#/components/schemas/SharedTaxonomy"
          },
          "vector_status": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Vector Status"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/SharedParticipant"
            },
            "type": "array",
            "title": "Participants"
          },
          "findings": {
            "items": {
              "$ref": "#/components/schemas/SharedFinding"
            },
            "type": "array",
            "title": "Findings"
          }
        },
        "type": "object",
        "title": "SharedResult"
      },
      "SharedScan": {
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "audio_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audio Url"
          }
        },
        "type": "object",
        "title": "SharedScan"
      },
      "SharedScanReport": {
        "properties": {
          "scan": {
            "$ref": "#/components/schemas/SharedScan"
          },
          "media": {
            "$ref": "#/components/schemas/SharedMedia"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SharedResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "scan",
          "media"
        ],
        "title": "SharedScanReport"
      },
      "SharedTaxonomy": {
        "properties": {
          "resolved": {
            "items": {
              "$ref": "#/components/schemas/SharedTaxonomyVector"
            },
            "type": "array",
            "title": "Resolved"
          }
        },
        "type": "object",
        "title": "SharedTaxonomy"
      },
      "SharedTaxonomyVector": {
        "properties": {
          "vector_id": {
            "type": "string",
            "title": "Vector Id"
          }
        },
        "type": "object",
        "required": [
          "vector_id"
        ],
        "title": "SharedTaxonomyVector"
      },
      "SharedTimeRef": {
        "properties": {
          "start_sec": {
            "type": "number",
            "title": "Start Sec"
          },
          "end_sec": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Sec"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "start_index": {
            "type": "integer",
            "title": "Start Index"
          },
          "end_index": {
            "type": "integer",
            "title": "End Index"
          }
        },
        "type": "object",
        "required": [
          "start_sec",
          "text",
          "start_index",
          "end_index"
        ],
        "title": "SharedTimeRef"
      },
      "SharedVerdict": {
        "properties": {
          "risk": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Risk"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "recommended_action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Action"
          },
          "requires_human_review": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Human Review"
          },
          "session_duration_sec": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Duration Sec"
          }
        },
        "type": "object",
        "title": "SharedVerdict"
      },
      "TaxonomyInput": {
        "properties": {
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "overrides": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TaxonomyVectorIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overrides"
          },
          "vectors": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TaxonomyVectorIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vectors"
          }
        },
        "type": "object",
        "title": "TaxonomyInput"
      },
      "TaxonomyTemplateCloneRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "type": "object",
        "title": "TaxonomyTemplateCloneRequest"
      },
      "TaxonomyTemplateFromScanRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "TaxonomyTemplateFromScanRequest"
      },
      "TaxonomyTemplateIn": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          },
          "vectors": {
            "items": {
              "$ref": "#/components/schemas/TaxonomyTemplateVectorIn"
            },
            "type": "array",
            "title": "Vectors"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "TaxonomyTemplateIn"
      },
      "TaxonomyTemplatePatch": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "vectors": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TaxonomyTemplateVectorIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vectors"
          }
        },
        "type": "object",
        "title": "TaxonomyTemplatePatch"
      },
      "TaxonomyTemplateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "workspace_id": {
            "type": "string",
            "title": "Workspace Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "vectors": {
            "items": {
              "$ref": "#/components/schemas/TaxonomyTemplateVectorIn"
            },
            "type": "array",
            "title": "Vectors"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "name",
          "description",
          "version",
          "vectors",
          "tags",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "TaxonomyTemplateResponse"
      },
      "TaxonomyTemplateVectorIn": {
        "properties": {
          "vector_id": {
            "type": "string",
            "title": "Vector Id"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          }
        },
        "type": "object",
        "required": [
          "vector_id"
        ],
        "title": "TaxonomyTemplateVectorIn"
      },
      "TaxonomyVectorIn": {
        "properties": {
          "vector_id": {
            "type": "string",
            "title": "Vector Id"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          }
        },
        "type": "object",
        "required": [
          "vector_id"
        ],
        "title": "TaxonomyVectorIn"
      },
      "TranscriptSegmentIn": {
        "properties": {
          "speaker": {
            "type": "string",
            "minLength": 1,
            "title": "Speaker",
            "description": "'candidate' or 'interviewer'"
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "title": "Text"
          },
          "start_sec": {
            "type": "number",
            "minimum": 0.0,
            "title": "Start Sec"
          },
          "end_sec": {
            "type": "number",
            "minimum": 0.0,
            "title": "End Sec"
          }
        },
        "type": "object",
        "required": [
          "speaker",
          "text",
          "start_sec",
          "end_sec"
        ],
        "title": "TranscriptSegmentIn"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WebhookEndpointCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled_events": {
            "items": {
              "type": "string",
              "enum": [
                "scan.completed",
                "scan.failed"
              ]
            },
            "type": "array",
            "title": "Enabled Events"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "verified": {
            "type": "boolean",
            "title": "Verified"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string",
                "const": "failing"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_delivery_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "succeeded",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery Status"
          },
          "consecutive_failures": {
            "type": "integer",
            "title": "Consecutive Failures",
            "default": 0
          },
          "failing_since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Since"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Expires At"
          },
          "stats": {
            "$ref": "#/components/schemas/WebhookEndpointStats"
          },
          "signing_secret": {
            "type": "string",
            "title": "Signing Secret"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "description",
          "enabled_events",
          "active",
          "verified",
          "created_at",
          "signing_secret"
        ],
        "title": "WebhookEndpointCreateResponse"
      },
      "WebhookEndpointRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled_events": {
            "items": {
              "type": "string",
              "enum": [
                "scan.completed",
                "scan.failed"
              ]
            },
            "type": "array",
            "minItems": 1,
            "title": "Enabled Events",
            "default": [
              "scan.completed",
              "scan.failed"
            ]
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "WebhookEndpointRequest"
      },
      "WebhookEndpointResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled_events": {
            "items": {
              "type": "string",
              "enum": [
                "scan.completed",
                "scan.failed"
              ]
            },
            "type": "array",
            "title": "Enabled Events"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "verified": {
            "type": "boolean",
            "title": "Verified"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string",
                "const": "failing"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_delivery_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "succeeded",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery Status"
          },
          "consecutive_failures": {
            "type": "integer",
            "title": "Consecutive Failures",
            "default": 0
          },
          "failing_since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Since"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Expires At"
          },
          "stats": {
            "$ref": "#/components/schemas/WebhookEndpointStats"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "description",
          "enabled_events",
          "active",
          "verified",
          "created_at"
        ],
        "title": "WebhookEndpointResponse"
      },
      "WebhookEndpointStats": {
        "properties": {
          "deliveries_7d": {
            "type": "integer",
            "title": "Deliveries 7D",
            "default": 0
          },
          "succeeded_7d": {
            "type": "integer",
            "title": "Succeeded 7D",
            "default": 0
          },
          "failed_7d": {
            "type": "integer",
            "title": "Failed 7D",
            "default": 0
          },
          "retrying_7d": {
            "type": "integer",
            "title": "Retrying 7D",
            "default": 0
          },
          "success_rate_7d": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Rate 7D"
          }
        },
        "type": "object",
        "title": "WebhookEndpointStats"
      },
      "WebhookTestResponse": {
        "properties": {
          "delivery_id": {
            "type": "string",
            "title": "Delivery Id"
          },
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Code"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "response_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Body"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "delivery_id",
          "success",
          "status_code",
          "latency_ms",
          "response_body"
        ],
        "title": "WebhookTestResponse"
      }
    }
  }
}
