{
  "openapi": "3.1.0",
  "info": {
    "title": "CVE Nextvision AI",
    "version": "0.1.0",
    "description": "All timestamps use UTC. CVE data is shared; workspace resources are isolated. API keys do not grant platform administration."
  },
  "servers": [
    {
      "url": "https://cve.nextvisions.ai"
    }
  ],
  "paths": {
    "/api/v1/meta": {
      "get": {
        "operationId": "get_api_v1_meta",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/meta",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/cves": {
      "get": {
        "operationId": "get_api_v1_cves",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/cves",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "critical",
                "high",
                "medium",
                "low",
                "none",
                "unknown"
              ]
            }
          },
          {
            "name": "kev",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cwe",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "updated",
                "published",
                "severity"
              ]
            }
          },
          {
            "name": "min_cvss",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 10
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "vi"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/cves/{id}": {
      "get": {
        "operationId": "get_api_v1_cves_id",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/cves/{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "vi"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CVE"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/cves/{id}/history": {
      "get": {
        "operationId": "get_api_v1_cves_id_history",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/cves/{id}/history",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/sitemap": {
      "get": {
        "operationId": "get_api_v1_sitemap",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/sitemap",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/stats": {
      "get": {
        "operationId": "get_api_v1_stats",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/stats",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/changes": {
      "get": {
        "operationId": "get_api_v1_changes",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/changes",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "410": {
            "description": "resync_required: synchronize a new snapshot"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/vendors": {
      "get": {
        "operationId": "get_api_v1_vendors",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/vendors",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/products": {
      "get": {
        "operationId": "get_api_v1_products",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/products",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/vendors/{slug}": {
      "get": {
        "operationId": "get_api_v1_vendors_slug",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/vendors/{slug}",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/products/{slug}": {
      "get": {
        "operationId": "get_api_v1_products_slug",
        "tags": [
          "Public"
        ],
        "summary": "GET /api/v1/products/{slug}",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/me": {
      "get": {
        "operationId": "get_api_v1_me",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/me",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "patch": {
        "operationId": "patch_api_v1_me",
        "tags": [
          "Account"
        ],
        "summary": "PATCH /api/v1/me",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreferencesInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/me/sessions": {
      "get": {
        "operationId": "get_api_v1_me_sessions",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/me/sessions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/me/sessions/{id}": {
      "delete": {
        "operationId": "delete_api_v1_me_sessions_id",
        "tags": [
          "Account"
        ],
        "summary": "DELETE /api/v1/me/sessions/{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/me/notifications": {
      "get": {
        "operationId": "get_api_v1_me_notifications",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/me/notifications",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/me/notifications/{id}": {
      "patch": {
        "operationId": "patch_api_v1_me_notifications_id",
        "tags": [
          "Account"
        ],
        "summary": "PATCH /api/v1/me/notifications/{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/me/events": {
      "get": {
        "operationId": "get_api_v1_me_events",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/me/events",
        "parameters": [
          {
            "name": "Last-Event-ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "description": "Durable personal SSE. Events: notification, session_revoked, resync_required. Last-Event-ID/cursor is supported; only the signed-in recipient is emitted."
      }
    },
    "/api/v1/me/notification-preferences": {
      "get": {
        "operationId": "get_api_v1_me_notification_preferences",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/me/notification-preferences",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "put": {
        "operationId": "put_api_v1_me_notification_preferences",
        "tags": [
          "Account"
        ],
        "summary": "PUT /api/v1/me/notification-preferences",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferences"
              }
            }
          }
        }
      }
    },
    "/api/v1/me/export": {
      "post": {
        "operationId": "post_api_v1_me_export",
        "tags": [
          "Account"
        ],
        "summary": "POST /api/v1/me/export",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/me/delete": {
      "post": {
        "operationId": "post_api_v1_me_delete",
        "tags": [
          "Account"
        ],
        "summary": "POST /api/v1/me/delete",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "202": {
            "description": "Deletion queued; application sessions and API keys are revoked immediately.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "enum": [
                      "DELETE"
                    ]
                  }
                },
                "required": [
                  "confirm"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/me/export/{id}": {
      "get": {
        "operationId": "get_api_v1_me_export_id",
        "tags": [
          "Account"
        ],
        "summary": "GET /api/v1/me/export/{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/follows": {
      "get": {
        "operationId": "get_api_v1_workspaces_workspace_follows",
        "tags": [
          "Workspace"
        ],
        "summary": "GET /api/v1/workspaces/{workspace}/follows",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "post_api_v1_workspaces_workspace_follows",
        "tags": [
          "Workspace"
        ],
        "summary": "POST /api/v1/workspaces/{workspace}/follows",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FollowInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace}/follows/{id}": {
      "delete": {
        "operationId": "delete_api_v1_workspaces_workspace_follows_id",
        "tags": [
          "Workspace"
        ],
        "summary": "DELETE /api/v1/workspaces/{workspace}/follows/{id}",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/watchlists": {
      "get": {
        "operationId": "get_api_v1_workspaces_workspace_watchlists",
        "tags": [
          "Workspace"
        ],
        "summary": "GET /api/v1/workspaces/{workspace}/watchlists",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "post_api_v1_workspaces_workspace_watchlists",
        "tags": [
          "Workspace"
        ],
        "summary": "POST /api/v1/workspaces/{workspace}/watchlists",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NameInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace}/watchlists/{id}": {
      "delete": {
        "operationId": "delete_api_v1_workspaces_workspace_watchlists_id",
        "tags": [
          "Workspace"
        ],
        "summary": "DELETE /api/v1/workspaces/{workspace}/watchlists/{id}",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/watchlists/{id}/items": {
      "post": {
        "operationId": "post_api_v1_workspaces_workspace_watchlists_id_items",
        "tags": [
          "Workspace"
        ],
        "summary": "POST /api/v1/workspaces/{workspace}/watchlists/{id}/items",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "follow_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "follow_id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace}/watchlists/{id}/items/{follow}": {
      "delete": {
        "operationId": "delete_api_v1_workspaces_workspace_watchlists_id_items_follow",
        "tags": [
          "Workspace"
        ],
        "summary": "DELETE /api/v1/workspaces/{workspace}/watchlists/{id}/items/{follow}",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "follow",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/saved-searches": {
      "get": {
        "operationId": "get_api_v1_workspaces_workspace_saved_searches",
        "tags": [
          "Workspace"
        ],
        "summary": "GET /api/v1/workspaces/{workspace}/saved-searches",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "post_api_v1_workspaces_workspace_saved_searches",
        "tags": [
          "Workspace"
        ],
        "summary": "POST /api/v1/workspaces/{workspace}/saved-searches",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedSearchInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace}/saved-searches/{id}": {
      "delete": {
        "operationId": "delete_api_v1_workspaces_workspace_saved_searches_id",
        "tags": [
          "Workspace"
        ],
        "summary": "DELETE /api/v1/workspaces/{workspace}/saved-searches/{id}",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/alert-rules": {
      "get": {
        "operationId": "get_api_v1_workspaces_workspace_alert_rules",
        "tags": [
          "Workspace"
        ],
        "summary": "GET /api/v1/workspaces/{workspace}/alert-rules",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "post_api_v1_workspaces_workspace_alert_rules",
        "tags": [
          "Workspace"
        ],
        "summary": "POST /api/v1/workspaces/{workspace}/alert-rules",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace}/alert-rules/{id}": {
      "delete": {
        "operationId": "delete_api_v1_workspaces_workspace_alert_rules_id",
        "tags": [
          "Workspace"
        ],
        "summary": "DELETE /api/v1/workspaces/{workspace}/alert-rules/{id}",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/api-keys": {
      "get": {
        "operationId": "get_api_v1_workspaces_workspace_api_keys",
        "tags": [
          "Workspace"
        ],
        "summary": "GET /api/v1/workspaces/{workspace}/api-keys",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "operationId": "post_api_v1_workspaces_workspace_api_keys",
        "tags": [
          "Workspace"
        ],
        "summary": "POST /api/v1/workspaces/{workspace}/api-keys",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace}/api-keys/{id}": {
      "delete": {
        "operationId": "delete_api_v1_workspaces_workspace_api_keys_id",
        "tags": [
          "Workspace"
        ],
        "summary": "DELETE /api/v1/workspaces/{workspace}/api-keys/{id}",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace}/usage": {
      "get": {
        "operationId": "get_api_v1_workspaces_workspace_usage",
        "tags": [
          "Workspace"
        ],
        "summary": "GET /api/v1/workspaces/{workspace}/usage",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/admin/overview": {
      "get": {
        "operationId": "get_api_v1_admin_overview",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/overview",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/users": {
      "get": {
        "operationId": "get_api_v1_admin_users",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/users",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/users/{id}/status": {
      "post": {
        "operationId": "post_api_v1_admin_users_id_status",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/users/{id}/status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/users/{id}/roles": {
      "post": {
        "operationId": "post_api_v1_admin_users_id_roles",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/users/{id}/roles",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RolesInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/users/{id}/revoke-sessions": {
      "post": {
        "operationId": "post_api_v1_admin_users_id_revoke_sessions",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/users/{id}/revoke-sessions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/jobs": {
      "get": {
        "operationId": "get_api_v1_admin_jobs",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/jobs",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/jobs/{id}/retry": {
      "post": {
        "operationId": "post_api_v1_admin_jobs_id_retry",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/jobs/{id}/retry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/translations": {
      "get": {
        "operationId": "get_api_v1_admin_translations",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/translations",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/translations/{id}": {
      "put": {
        "operationId": "put_api_v1_admin_translations_id",
        "tags": [
          "Administration"
        ],
        "summary": "PUT /api/v1/admin/translations/{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewInput"
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/ingestion": {
      "get": {
        "operationId": "get_api_v1_admin_ingestion",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/ingestion",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/audit": {
      "get": {
        "operationId": "get_api_v1_admin_audit",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/audit",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/api-keys": {
      "get": {
        "operationId": "get_api_v1_admin_api_keys",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/api-keys",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/api-keys/{id}": {
      "delete": {
        "operationId": "delete_api_v1_admin_api_keys_id",
        "tags": [
          "Administration"
        ],
        "summary": "DELETE /api/v1/admin/api-keys/{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/workspaces/{id}/quota": {
      "post": {
        "operationId": "post_api_v1_admin_workspaces_id_quota",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/workspaces/{id}/quota",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "daily_quota": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "per_minute": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3
                  }
                },
                "required": [
                  "daily_quota",
                  "per_minute",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/deliveries": {
      "get": {
        "operationId": "get_api_v1_admin_deliveries",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/deliveries",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/products": {
      "get": {
        "operationId": "get_api_v1_admin_products",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/products",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/v1/admin/products/{id}/aliases": {
      "post": {
        "operationId": "post_api_v1_admin_products_id_aliases",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/products/{id}/aliases",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alias": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3
                  }
                },
                "required": [
                  "alias",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/budgets": {
      "get": {
        "operationId": "get_api_v1_admin_budgets",
        "tags": [
          "Administration"
        ],
        "summary": "GET /api/v1/admin/budgets",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "operationId": "post_api_v1_admin_budgets",
        "tags": [
          "Administration"
        ],
        "summary": "POST /api/v1/admin/budgets",
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "description": "Required for cookie-authenticated mutations. Obtain from /api/v1/me.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "201": {
            "description": "Created. API key secret is returned only on creation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "cap_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "name",
                  "cap_usd"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Search": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 256
          },
          "severity": {
            "type": "string",
            "enum": [
              "critical",
              "high",
              "medium",
              "low",
              "none",
              "unknown"
            ]
          },
          "kev": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ]
          },
          "vendor": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "cwe": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "sort": {
            "type": "string",
            "enum": [
              "updated",
              "published",
              "severity"
            ]
          },
          "min_cvss": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "FollowInput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "cve",
              "vendor",
              "product",
              "search"
            ]
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "target"
        ],
        "additionalProperties": false
      },
      "NameInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "SavedSearchInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "filters": {
            "$ref": "#/components/schemas/Search"
          }
        },
        "required": [
          "name",
          "filters"
        ],
        "additionalProperties": false
      },
      "AlertRuleInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "watchlist_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "min_cvss": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 10
          },
          "kev_only": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "published",
                "updated",
                "affected",
                "kev",
                "rejected"
              ]
            }
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "APIKeyInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "cves:read",
                "search:read",
                "changes:read",
                "follows:read",
                "follows:write",
                "notifications:read"
              ]
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "daily_quota": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000000
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "PreferencesInput": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "maxLength": 100
          },
          "locale": {
            "type": "string",
            "enum": [
              "en",
              "vi"
            ]
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [
          "locale",
          "timezone"
        ],
        "additionalProperties": false
      },
      "NotificationPreferences": {
        "type": "object",
        "properties": {
          "email_enabled": {
            "type": "boolean"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "instant",
              "daily"
            ]
          },
          "hour": {
            "type": "integer",
            "minimum": 0,
            "maximum": 23
          },
          "quiet_start": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 23
          },
          "quiet_end": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 23
          }
        },
        "required": [
          "email_enabled",
          "frequency",
          "hour"
        ],
        "additionalProperties": false
      },
      "CVE": {
        "type": "object",
        "required": [
          "id",
          "state",
          "cvss",
          "severity",
          "content_language",
          "translation_status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "PUBLISHED",
              "REJECTED"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "cvss": {
            "type": [
              "number",
              "null"
            ]
          },
          "severity": {
            "type": "string"
          },
          "kev": {
            "type": "boolean"
          },
          "epss": {
            "type": [
              "number",
              "null"
            ]
          },
          "content_language": {
            "type": "string",
            "enum": [
              "en",
              "vi"
            ]
          },
          "translation_status": {
            "type": "string",
            "enum": [
              "pending",
              "translating",
              "ready",
              "failed",
              "stale"
            ]
          },
          "modified_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "score": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "vector": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Page": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "next_cursor": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          }
        }
      },
      "Me": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "locale": {
            "type": "string",
            "enum": [
              "en",
              "vi"
            ]
          },
          "timezone": {
            "type": "string"
          },
          "csrf_token": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mfa": {
            "type": "boolean"
          }
        }
      },
      "StatusInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 3
          }
        },
        "required": [
          "status",
          "reason"
        ],
        "additionalProperties": false
      },
      "RolesInput": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "user",
                "content_editor",
                "operator",
                "platform_admin",
                "super_admin"
              ]
            }
          },
          "reason": {
            "type": "string",
            "minLength": 3
          }
        },
        "required": [
          "roles",
          "reason"
        ],
        "additionalProperties": false
      },
      "ReviewInput": {
        "type": "object",
        "properties": {
          "source_content_hash": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "rejection_reason": {
            "type": "string"
          },
          "verdict": {
            "type": "string",
            "enum": [
              "pass",
              "fail"
            ]
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "source_content_hash",
          "title",
          "description",
          "rejection_reason",
          "verdict"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Invalid key or expired session",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Missing scope, MFA, permission, CSRF or reauthentication",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found in permitted scope",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "Source changed, last admin or conflicting state",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Workspace/key quota exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "nv_cve_<public_id>_<secret>"
      },
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-cve_session"
      }
    }
  }
}
