{
  "openapi": "3.1.0",
  "info": {
    "title": "OzVault Storage API",
    "version": "0.1.0",
    "description": "Developer object storage. Resolve the deployed API origin from https://ozvault.vercel.app/api/connection; replace the local server below with that origin. Large bytes go directly to this API, never through the Vercel bridge. The current quick-tunnel connection can change on restart. UUIDs and responses in examples are illustrative contract shapes, not live credentials. All sessions, objects, metadata and operational state persist on the operator Windows machine."
  },
  "servers": [
    {
      "url": "https://api.ozvault.lol",
      "description": "OzVault public storage API"
    },
    {
      "url": "http://localhost:4100",
      "description": "Local development API"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "GET_health",
        "summary": "GET /health",
        "tags": [
          "health"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ready": {
      "get": {
        "operationId": "GET_ready",
        "summary": "GET /ready",
        "tags": [
          "health"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/support": {
      "post": {
        "operationId": "POST_v1_support",
        "summary": "POST /v1/support",
        "tags": [
          "support"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 5000
                  },
                  "website": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "subject",
                  "message"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/auth/providers": {
      "get": {
        "operationId": "GET_v1_auth_providers",
        "summary": "GET /v1/auth/providers",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/auth/discord/start": {
      "post": {
        "operationId": "POST_v1_auth_discord_start",
        "summary": "POST /v1/auth/discord/start",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnTo": {
                    "type": "string",
                    "enum": [
                      "/dashboard",
                      "/dashboard/settings"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        }
      }
    },
    "/v1/auth/discord/complete": {
      "post": {
        "operationId": "POST_v1_auth_discord_complete",
        "summary": "POST /v1/auth/discord/complete",
        "tags": [
          "auth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "browserToken": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "state",
                  "browserToken"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/auth/me": {
      "get": {
        "operationId": "GET_v1_auth_me",
        "summary": "GET /v1/auth/me",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/auth/logout": {
      "post": {
        "operationId": "POST_v1_auth_logout",
        "summary": "POST /v1/auth/logout",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/auth/sessions": {
      "get": {
        "operationId": "GET_v1_auth_sessions",
        "summary": "GET /v1/auth/sessions",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/auth/sessions/{id}": {
      "delete": {
        "operationId": "DELETE_v1_auth_sessions_id_",
        "summary": "DELETE /v1/auth/sessions/{id}",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/account": {
      "patch": {
        "operationId": "PATCH_v1_account",
        "summary": "PATCH /v1/account",
        "tags": [
          "account"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_account",
        "summary": "DELETE /v1/account",
        "tags": [
          "account"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "const": "DELETE",
                    "type": "string"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/account/export": {
      "get": {
        "operationId": "GET_v1_account_export",
        "summary": "GET /v1/account/export",
        "tags": [
          "account"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "GET_v1_projects",
        "summary": "GET /v1/projects",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: projects:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      },
      "post": {
        "operationId": "POST_v1_projects",
        "summary": "POST /v1/projects",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: projects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/projects/{id}": {
      "patch": {
        "operationId": "PATCH_v1_projects_id_",
        "summary": "PATCH /v1/projects/{id}",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: projects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_projects_id_",
        "summary": "DELETE /v1/projects/{id}",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: projects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      }
    },
    "/v1/buckets": {
      "get": {
        "operationId": "GET_v1_buckets",
        "summary": "GET /v1/buckets",
        "tags": [
          "buckets"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: buckets:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      },
      "post": {
        "operationId": "POST_v1_buckets",
        "summary": "POST /v1/buckets",
        "tags": [
          "buckets"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: buckets:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{1,62}$"
                  }
                },
                "required": [
                  "projectId",
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/buckets/{id}": {
      "patch": {
        "operationId": "PATCH_v1_buckets_id_",
        "summary": "PATCH /v1/buckets/{id}",
        "tags": [
          "buckets"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: buckets:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{1,62}$"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_buckets_id_",
        "summary": "DELETE /v1/buckets/{id}",
        "tags": [
          "buckets"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: buckets:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      }
    },
    "/v1/folders": {
      "get": {
        "operationId": "GET_v1_folders",
        "summary": "GET /v1/folders",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      },
      "post": {
        "operationId": "POST_v1_folders",
        "summary": "POST /v1/folders",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bucketId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "prefix": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "bucketId",
                  "prefix"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/objects": {
      "get": {
        "operationId": "GET_v1_objects",
        "summary": "GET /v1/objects",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StoredObject"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      }
    },
    "/v1/objects/{id}": {
      "get": {
        "operationId": "GET_v1_objects_id_",
        "summary": "GET /v1/objects/{id}",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredObject"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      },
      "patch": {
        "operationId": "PATCH_v1_objects_id_",
        "summary": "PATCH /v1/objects/{id}",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "bucketId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_objects_id_",
        "summary": "DELETE /v1/objects/{id}",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      }
    },
    "/v1/uploads": {
      "post": {
        "operationId": "POST_v1_uploads",
        "summary": "POST /v1/uploads",
        "tags": [
          "uploads"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side. Encrypted size equals plainSize + 16 × max(1,ceil(plainSize/4194304)). Default ciphertext limit 256,000,000 bytes. UUID idempotencyKey deduplicates retries. Returns uploadUrl, uploadToken, id, offset_bytes, status and chunkBytes. Capability expires in 24 hours.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadRequest"
              }
            }
          }
        }
      }
    },
    "/v1/uploads/{id}": {
      "get": {
        "operationId": "GET_v1_uploads_id_",
        "summary": "GET /v1/uploads/{id}",
        "tags": [
          "uploads"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      },
      "patch": {
        "operationId": "PATCH_v1_uploads_id_",
        "summary": "PATCH /v1/uploads/{id}",
        "tags": [
          "uploads"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Upload-Offset",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "Upload-Offset": {
                "schema": {
                  "type": "integer"
                },
                "description": "New committed offset"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Upload at most 4 MiB + 16 bytes per request to the API directly. Bearer credential may be the upload capability returned by creation. Upload-Offset must exactly equal the durable committed offset. Query GET on this URL after interruption. This is the OzVault offset protocol, not tus.",
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 4194320
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_uploads_id_",
        "summary": "DELETE /v1/uploads/{id}",
        "tags": [
          "uploads"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      }
    },
    "/v1/uploads/{id}/complete": {
      "post": {
        "operationId": "POST_v1_uploads_id_complete",
        "summary": "POST /v1/uploads/{id}/complete",
        "tags": [
          "uploads"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "sha256"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/objects/{id}/copy": {
      "post": {
        "operationId": "POST_v1_objects_id_copy",
        "summary": "POST /v1/objects/{id}/copy",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "bucketId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "name",
                  "bucketId"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/objects/{id}/restore": {
      "post": {
        "operationId": "POST_v1_objects_id_restore",
        "summary": "POST /v1/objects/{id}/restore",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side. Restore within retention; does not change billed bytes. Trash still consumes quota."
      }
    },
    "/v1/objects/{id}/purge": {
      "post": {
        "operationId": "POST_v1_objects_id_purge",
        "summary": "POST /v1/objects/{id}/purge",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Permanently deletes an object that is already in the trash and frees its quota immediately. 409 NOT_IN_TRASH otherwise. Cannot be undone."
      }
    },
    "/v1/objects/{id}/content": {
      "get": {
        "operationId": "GET_v1_objects_id_content",
        "summary": "GET /v1/objects/{id}/content",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Returns authorized encrypted object bytes. Use the SDK to verify and decrypt."
      }
    },
    "/v1/objects/{id}/signed-url": {
      "post": {
        "operationId": "POST_v1_objects_id_signed_url",
        "summary": "POST /v1/objects/{id}/signed-url",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresIn": {
                    "type": "integer",
                    "minimum": 30,
                    "maximum": 86400,
                    "default": 900
                  }
                },
                "required": []
              }
            }
          }
        }
      }
    },
    "/v1/shares": {
      "get": {
        "operationId": "GET_v1_shares",
        "summary": "GET /v1/shares",
        "tags": [
          "shares"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/shares/{id}": {
      "delete": {
        "operationId": "DELETE_v1_shares_id_",
        "summary": "DELETE /v1/shares/{id}",
        "tags": [
          "shares"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "GET_v1_usage",
        "summary": "GET /v1/usage",
        "tags": [
          "usage"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: usage:read. Account sessions are also accepted. Scope and project/bucket ownership are checked server-side."
      }
    },
    "/v1/keys": {
      "get": {
        "operationId": "GET_v1_keys",
        "summary": "GET /v1/keys",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      },
      "post": {
        "operationId": "POST_v1_keys",
        "summary": "POST /v1/keys",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyRequest"
              }
            }
          }
        }
      }
    },
    "/v1/keys/{id}": {
      "delete": {
        "operationId": "DELETE_v1_keys_id_",
        "summary": "DELETE /v1/keys/{id}",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/plans": {
      "get": {
        "operationId": "GET_v1_plans",
        "summary": "GET /v1/plans",
        "tags": [
          "plans"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/billing": {
      "get": {
        "operationId": "GET_v1_billing",
        "summary": "GET /v1/billing",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/billing/subscribe": {
      "post": {
        "operationId": "POST_v1_billing_subscribe",
        "summary": "POST /v1/billing/subscribe",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "plus",
                      "pro",
                      "business"
                    ]
                  }
                },
                "required": [
                  "plan"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/billing/reconcile": {
      "post": {
        "operationId": "POST_v1_billing_reconcile",
        "summary": "POST /v1/billing/reconcile",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/billing/cancel": {
      "post": {
        "operationId": "POST_v1_billing_cancel",
        "summary": "POST /v1/billing/cancel",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/billing/webhook": {
      "post": {
        "operationId": "POST_v1_billing_webhook",
        "summary": "POST /v1/billing/webhook",
        "tags": [
          "billing"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Complete, unmodified PayPal webhook JSON, verified server-side with the PayPal transmission headers."
              }
            }
          }
        }
      }
    },
    "/v1/admin/overview": {
      "get": {
        "operationId": "GET_v1_admin_overview",
        "summary": "GET /v1/admin/overview",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory."
      }
    },
    "/v1/admin/accounts": {
      "get": {
        "operationId": "GET_v1_admin_accounts",
        "summary": "GET /v1/admin/accounts",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory."
      }
    },
    "/v1/admin/accounts/{id}": {
      "patch": {
        "operationId": "PATCH_v1_admin_accounts_id_",
        "summary": "PATCH /v1/admin/accounts/{id}",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "suspended"
                    ]
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/admin/system": {
      "patch": {
        "operationId": "PATCH_v1_admin_system",
        "summary": "PATCH /v1/admin/system",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "maintenance": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "maintenance"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/admin/plans/{id}": {
      "patch": {
        "operationId": "PATCH_v1_admin_plans_id_",
        "summary": "PATCH /v1/admin/plans/{id}",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "paypalPlanId": {
                    "type": "string",
                    "pattern": "^P-[A-Z0-9]+$"
                  },
                  "price": {
                    "type": "string",
                    "pattern": "^\\d+\\.\\d{2}$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "quota": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "paypalPlanId",
                  "price",
                  "currency",
                  "quota",
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/admin/oauth/applications": {
      "get": {
        "operationId": "GET_v1_admin_oauth_applications",
        "summary": "GET /v1/admin/oauth/applications",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory."
      }
    },
    "/v1/admin/oauth/applications/{id}": {
      "patch": {
        "operationId": "PATCH_v1_admin_oauth_applications_id_",
        "summary": "PATCH /v1/admin/oauth/applications/{id}",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "publisherVerified": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "publisherVerified"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/admin/support/{id}": {
      "patch": {
        "operationId": "PATCH_v1_admin_support_id_",
        "summary": "PATCH /v1/admin/support/{id}",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. An administrator role and a session whose Discord profile reported MFA enabled are mandatory.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "resolved"
                    ]
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/assistant": {
      "post": {
        "operationId": "POST_v1_assistant",
        "summary": "POST /v1/assistant",
        "tags": [
          "assistant"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "help",
                      "sql"
                    ]
                  },
                  "messages": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 6000
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  }
                },
                "required": [
                  "messages"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/assistant/status": {
      "get": {
        "operationId": "GET_v1_assistant_status",
        "summary": "GET /v1/assistant/status",
        "tags": [
          "assistant"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "operationId": "GET_well_known_oauth_authorization_server",
        "summary": "GET /.well-known/oauth-authorization-server",
        "tags": [
          "oauth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/.well-known/openid-configuration": {
      "get": {
        "operationId": "GET_well_known_openid_configuration",
        "summary": "GET /.well-known/openid-configuration",
        "tags": [
          "oauth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/oauth/jwks": {
      "get": {
        "operationId": "GET_oauth_jwks",
        "summary": "GET /oauth/jwks",
        "tags": [
          "oauth"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/oauth/authorization-requests": {
      "post": {
        "operationId": "POST_v1_oauth_authorization_requests",
        "summary": "POST /v1/oauth/authorization-requests",
        "tags": [
          "oauth"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": []
              }
            }
          }
        }
      }
    },
    "/v1/oauth/authorization-requests/{id}/decision": {
      "post": {
        "operationId": "POST_v1_oauth_authorization_requests_id_decision",
        "summary": "POST /v1/oauth/authorization-requests/{id}/decision",
        "tags": [
          "oauth"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approve": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "approve"
                ]
              }
            }
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "operationId": "POST_oauth_token",
        "summary": "POST /oauth/token",
        "tags": [
          "oauth"
        ],
        "security": [
          {
            "ClientSecretBasic": []
          },
          {}
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "RFC 6749 client authentication: HTTP Basic (client_secret_basic), client_id + client_secret in the body (client_secret_post), or client_id alone for public clients. Errors use {error, error_description}. Served on the issuer origin; this API origin answers identically.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "authorization_code",
                      "refresh_token"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string",
                    "minLength": 43,
                    "maxLength": 128
                  },
                  "refresh_token": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "grant_type"
                ]
              }
            }
          }
        }
      }
    },
    "/oauth/revoke": {
      "post": {
        "operationId": "POST_oauth_revoke",
        "summary": "POST /oauth/revoke",
        "tags": [
          "oauth"
        ],
        "security": [
          {
            "ClientSecretBasic": []
          },
          {}
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "RFC 6749 client authentication: HTTP Basic (client_secret_basic), client_id + client_secret in the body (client_secret_post), or client_id alone for public clients. Errors use {error, error_description}. Served on the issuer origin; this API origin answers identically.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "token_type_hint": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        }
      }
    },
    "/oauth/introspect": {
      "post": {
        "operationId": "POST_oauth_introspect",
        "summary": "POST /oauth/introspect",
        "tags": [
          "oauth"
        ],
        "security": [
          {
            "ClientSecretBasic": []
          },
          {}
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "RFC 6749 client authentication: HTTP Basic (client_secret_basic), client_id + client_secret in the body (client_secret_post), or client_id alone for public clients. Errors use {error, error_description}. Served on the issuer origin; this API origin answers identically.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "token_type_hint": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        }
      }
    },
    "/oauth/userinfo": {
      "get": {
        "operationId": "GET_oauth_userinfo",
        "summary": "GET /oauth/userinfo",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "openid"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with openid. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      },
      "post": {
        "operationId": "POST_oauth_userinfo",
        "summary": "POST /oauth/userinfo",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "openid"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with openid. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      }
    },
    "/v1/account/connections": {
      "get": {
        "operationId": "GET_v1_account_connections",
        "summary": "GET /v1/account/connections",
        "tags": [
          "account"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/account/connections/{id}": {
      "delete": {
        "operationId": "DELETE_v1_account_connections_id_",
        "summary": "DELETE /v1/account/connections/{id}",
        "tags": [
          "account"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/developer/applications": {
      "get": {
        "operationId": "GET_v1_developer_applications",
        "summary": "GET /v1/developer/applications",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      },
      "post": {
        "operationId": "POST_v1_developer_applications",
        "summary": "POST /v1/developer/applications",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "publisherName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "websiteUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "privacyPolicyUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "termsUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "redirectUris": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "openid",
                        "profile:read",
                        "email:read",
                        "storage:quota:read",
                        "storage:app:read",
                        "storage:app:write",
                        "storage:app:delete",
                        "offline_access"
                      ]
                    }
                  },
                  "clientType": {
                    "type": "string",
                    "enum": [
                      "confidential",
                      "public"
                    ]
                  }
                },
                "required": [
                  "name",
                  "clientType",
                  "redirectUris",
                  "scopes"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/developer/applications/{id}": {
      "get": {
        "operationId": "GET_v1_developer_applications_id_",
        "summary": "GET /v1/developer/applications/{id}",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      },
      "patch": {
        "operationId": "PATCH_v1_developer_applications_id_",
        "summary": "PATCH /v1/developer/applications/{id}",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "publisherName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "websiteUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "privacyPolicyUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "termsUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  },
                  "redirectUris": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "openid",
                        "profile:read",
                        "email:read",
                        "storage:quota:read",
                        "storage:app:read",
                        "storage:app:write",
                        "storage:app:delete",
                        "offline_access"
                      ]
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_developer_applications_id_",
        "summary": "DELETE /v1/developer/applications/{id}",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "The exact application name"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/developer/applications/{id}/secrets": {
      "post": {
        "operationId": "POST_v1_developer_applications_id_secrets",
        "summary": "POST /v1/developer/applications/{id}/secrets",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expireExistingInHours": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      24,
                      168
                    ],
                    "default": 24
                  }
                },
                "required": []
              }
            }
          }
        }
      }
    },
    "/v1/developer/applications/{id}/secrets/{secret}Id": {
      "delete": {
        "operationId": "DELETE_v1_developer_applications_id_secrets_secret_Id",
        "summary": "DELETE /v1/developer/applications/{id}/secrets/{secret}Id",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/developer/applications/{id}/logo": {
      "post": {
        "operationId": "POST_v1_developer_applications_id_logo",
        "summary": "POST /v1/developer/applications/{id}/logo",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "description": "data:image/png|jpeg|webp;base64,… (at most 64 KB decoded)"
                  }
                },
                "required": [
                  "image"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_developer_applications_id_logo",
        "summary": "DELETE /v1/developer/applications/{id}/logo",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/oauth/applications/{id}/logo": {
      "get": {
        "operationId": "GET_v1_oauth_applications_id_logo",
        "summary": "GET /v1/oauth/applications/{id}/logo",
        "tags": [
          "oauth"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/developer/applications/{id}/analytics": {
      "get": {
        "operationId": "GET_v1_developer_applications_id_analytics",
        "summary": "GET /v1/developer/applications/{id}/analytics",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/developer/applications/{id}/events": {
      "get": {
        "operationId": "GET_v1_developer_applications_id_events",
        "summary": "GET /v1/developer/applications/{id}/events",
        "tags": [
          "developer"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/account/profile": {
      "get": {
        "operationId": "GET_v1_account_profile",
        "summary": "GET /v1/account/profile",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "profile:read"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with profile:read. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      }
    },
    "/v1/storage/quota": {
      "get": {
        "operationId": "GET_v1_storage_quota",
        "summary": "GET /v1/storage/quota",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:quota:read"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with storage:quota:read. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      }
    },
    "/v1/app/files": {
      "get": {
        "operationId": "GET_v1_app_files",
        "summary": "GET /v1/app/files",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:app:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "prefix",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with storage:app:read. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      },
      "post": {
        "operationId": "POST_v1_app_files",
        "summary": "POST /v1/app/files",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:app:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "contentType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "name": "sha256",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with storage:app:write. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750). replace=true also requires storage:app:delete.",
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 4194304
              }
            }
          }
        }
      }
    },
    "/v1/app/files/{id}": {
      "get": {
        "operationId": "GET_v1_app_files_id_",
        "summary": "GET /v1/app/files/{id}",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:app:read"
            ]
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with storage:app:read. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      },
      "delete": {
        "operationId": "DELETE_v1_app_files_id_",
        "summary": "DELETE /v1/app/files/{id}",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:app:delete"
            ]
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with storage:app:delete. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      }
    },
    "/v1/app/files/{id}/content": {
      "get": {
        "operationId": "GET_v1_app_files_id_content",
        "summary": "GET /v1/app/files/{id}/content",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:app:read"
            ]
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "OzVault Connect access token with storage:app:read. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750). Always served as an attachment with X-Content-SHA256 and X-Ozvault-Content-Type."
      }
    },
    "/v1/app/uploads": {
      "post": {
        "operationId": "POST_v1_app_uploads",
        "summary": "POST /v1/app/uploads",
        "tags": [
          "oauth-resources"
        ],
        "security": [
          {
            "OzVaultOAuth": [
              "storage:app:write"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "size": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "replace": {
                    "type": "boolean",
                    "default": false
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "name",
                  "size",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "description": "OzVault Connect access token with storage:app:write. Only the authorizing user's account and this application's isolated storage area are reachable. 401 INVALID_TOKEN / 403 INSUFFICIENT_SCOPE carry WWW-Authenticate (RFC 6750)."
      }
    },
    "/v1/objects/{id}/share-links": {
      "post": {
        "operationId": "POST_v1_objects_id_share_links",
        "summary": "POST /v1/objects/{id}/share-links",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:read. Creates a share link for a client-encrypted object with an expiry (60 s to 30 days), an optional password and an optional download limit. Returns url (the decryption key belongs in its #fragment, added by the client) and shareToken.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresIn": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 2592000,
                    "default": 86400
                  },
                  "passwordProof": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "Hex SHA-256 of 'ozvault-share-password:v1:' + password. The password itself never reaches the server; the proof is stored as a scrypt hash."
                  },
                  "keyWrapped": {
                    "type": "boolean",
                    "default": false,
                    "description": "The link fragment carries the object key wrapped with the password (requires passwordProof)."
                  },
                  "maxDownloads": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 100000,
                    "default": null
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 80
                  }
                },
                "required": []
              }
            }
          }
        }
      },
      "get": {
        "operationId": "GET_v1_objects_id_share_links",
        "summary": "GET /v1/objects/{id}/share-links",
        "tags": [
          "objects"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:read. Live share links for one object."
      }
    },
    "/v1/share-links/{id}": {
      "delete": {
        "operationId": "DELETE_v1_share_links_id_",
        "summary": "DELETE /v1/share-links/{id}",
        "tags": [
          "share-links"
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Required API-key scope: objects:write. Revokes a share link immediately."
      }
    },
    "/v1/shares/{token}": {
      "get": {
        "operationId": "GET_v1_shares_token_",
        "summary": "GET /v1/shares/{token}",
        "tags": [
          "shares"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Public share metadata. Names and labels of password-protected links stay hidden. 410 SHARE_EXHAUSTED when the download limit is reached."
      }
    },
    "/v1/shares/{token}/download": {
      "post": {
        "operationId": "POST_v1_shares_token_download",
        "summary": "POST /v1/shares/{token}/download",
        "tags": [
          "shares"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "passwordProof": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": []
              }
            }
          }
        },
        "description": "Counts one download and returns a single-use URL valid for ten minutes. 401 PASSWORD_REQUIRED, 403 PASSWORD_INCORRECT, 410 SHARE_EXHAUSTED. Rate limited per visitor and per link."
      }
    },
    "/v1/share-downloads/{ticket}": {
      "get": {
        "operationId": "GET_v1_share_downloads_ticket_",
        "summary": "GET /v1/share-downloads/{ticket}",
        "tags": [
          "share-downloads"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "ticket",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Single-use ciphertext download issued by POST /v1/shares/{token}/download. 410 DOWNLOAD_EXPIRED once used or after ten minutes."
      }
    },
    "/v1/shares/{token}/content": {
      "get": {
        "operationId": "GET_v1_shares_token_content",
        "summary": "GET /v1/shares/{token}/content",
        "tags": [
          "shares"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "The token in the path is a revocable, expiring bearer capability. Returns ciphertext, not plaintext. Keys are never sent to the API."
      }
    },
    "/v1/referrals/terms": {
      "get": {
        "operationId": "GET_v1_referrals_terms",
        "summary": "GET /v1/referrals/terms",
        "tags": [
          "referrals"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Public referral terms: reward sizes, cap and qualification age. CORS-open."
      }
    },
    "/v1/referrals": {
      "get": {
        "operationId": "GET_v1_referrals",
        "summary": "GET /v1/referrals",
        "tags": [
          "referrals"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Your referral code and link, statistics and invitees (names masked)."
      }
    },
    "/v1/widgets": {
      "get": {
        "operationId": "GET_v1_widgets",
        "summary": "GET /v1/widgets",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Usage widgets of the signed-in account, including their embed, JSON and badge URLs."
      },
      "post": {
        "operationId": "POST_v1_widgets",
        "summary": "POST /v1/widgets",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Creates a read-only usage widget token (ovw_…). It reveals used and total storage, plan and optionally the file count — nothing else. At most 20.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "showFiles": {
                    "type": "boolean",
                    "default": true
                  },
                  "theme": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "dark",
                      "light"
                    ],
                    "default": "auto"
                  }
                },
                "required": [
                  "label"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/widgets/{id}": {
      "patch": {
        "operationId": "PATCH_v1_widgets_id_",
        "summary": "PATCH /v1/widgets/{id}",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "showFiles": {
                    "type": "boolean"
                  },
                  "theme": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "dark",
                      "light"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_v1_widgets_id_",
        "summary": "DELETE /v1/widgets/{id}",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials."
      }
    },
    "/v1/widget/{token}": {
      "get": {
        "operationId": "GET_v1_widget_token_",
        "summary": "GET /v1/widget/{token}",
        "tags": [
          "widget"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Public, CORS-open usage numbers for one widget token. Cached for 60 seconds."
      }
    },
    "/v1/widget/{token}/badge.svg": {
      "get": {
        "operationId": "GET_v1_widget_token_badge_svg",
        "summary": "GET /v1/widget/{token}/badge.svg",
        "tags": [
          "widget"
        ],
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Public SVG badge such as “ozvault | 2.10 GB of 15.00 GB”."
      }
    },
    "/v1/status/summary": {
      "get": {
        "operationId": "GET_v1_status_summary",
        "summary": "GET /v1/status/summary",
        "tags": [
          "status"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Public, CORS-open uptime: current check, 24h/7d/30d/90d availability, 90 daily bars, incidents of 3+ minutes, storage capacity, and totals (active accounts and encrypted bytes stored, trash included). Minutes with no recorded health check count as downtime; history starts at the first recorded minute."
      }
    },
    "/v1/status/badge.svg": {
      "get": {
        "operationId": "GET_v1_status_badge_svg",
        "summary": "GET /v1/status/badge.svg",
        "tags": [
          "status"
        ],
        "security": [],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "status",
                "uptime"
              ],
              "default": "status"
            }
          },
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "90d"
              ],
              "default": "30d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Public SVG badge: type=status (default) or type=uptime with window=24h|7d|30d|90d."
      }
    },
    "/v1/owner/accounts": {
      "get": {
        "operationId": "GET_v1_owner_accounts",
        "summary": "GET /v1/owner/accounts",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/accounts/{id}": {
      "get": {
        "operationId": "GET_v1_owner_accounts_id_",
        "summary": "GET /v1/owner/accounts/{id}",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/accounts/{id}/storage": {
      "patch": {
        "operationId": "PATCH_v1_owner_accounts_id_storage",
        "summary": "PATCH /v1/owner/accounts/{id}/storage",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/accounts/{id}/ban": {
      "post": {
        "operationId": "POST_v1_owner_accounts_id_ban",
        "summary": "POST /v1/owner/accounts/{id}/ban",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/accounts/{id}/unban": {
      "post": {
        "operationId": "POST_v1_owner_accounts_id_unban",
        "summary": "POST /v1/owner/accounts/{id}/unban",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/accounts/{id}/buckets": {
      "get": {
        "operationId": "GET_v1_owner_accounts_id_buckets",
        "summary": "GET /v1/owner/accounts/{id}/buckets",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/accounts/{id}/files": {
      "get": {
        "operationId": "GET_v1_owner_accounts_id_files",
        "summary": "GET /v1/owner/accounts/{id}/files",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/ip-bans": {
      "get": {
        "operationId": "GET_v1_owner_ip_bans",
        "summary": "GET /v1/owner/ip-bans",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      },
      "post": {
        "operationId": "POST_v1_owner_ip_bans",
        "summary": "POST /v1/owner/ip-bans",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    },
    "/v1/owner/ip-bans/{id}": {
      "delete": {
        "operationId": "DELETE_v1_owner_ip_bans_id_",
        "summary": "DELETE /v1/owner/ip-bans/{id}",
        "tags": [
          "owner"
        ],
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Requires a signed-in account session. Mutations require an allowed Origin and X-Ozvault-Csrf: 1. API keys cannot manage accounts, billing or credentials. Owner panel only: the session must belong to a Discord ID in OWNER_DISCORD_IDS with two-factor authentication; changes also need a sign-in within 12 hours. Every change is written to the audit log."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Scoped API key, or upload capability for one upload URL"
      },
      "OzVaultOAuth": {
        "type": "oauth2",
        "description": "OzVault Connect. Authorization code flow with mandatory PKCE (S256). Discovery: https://ozvault.lol/.well-known/openid-configuration",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://ozvault.lol/oauth/authorize",
            "tokenUrl": "https://ozvault.lol/oauth/token",
            "refreshUrl": "https://ozvault.lol/oauth/token",
            "scopes": {
              "openid": "OpenID Connect sign-in. Adds an ES256-signed id_token with a pairwise subject identifier.",
              "profile:read": "GET /v1/account/profile returns the display name.",
              "email:read": "Adds email and email_verified to the profile and userinfo.",
              "storage:quota:read": "GET /v1/storage/quota returns account-wide capacity in bytes.",
              "storage:app:read": "List, inspect and download files in the application's storage area.",
              "storage:app:write": "Upload files into the application's storage area.",
              "storage:app:delete": "Move app files to the user's trash, or replace a file on upload.",
              "offline_access": "Issues a rotating refresh token."
            }
          }
        }
      },
      "ClientSecretBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "OAuth client_id and client_secret (confidential clients)"
      },
      "Session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-ov_session",
        "description": "HTTPS production session; development cookie name ov_session. Mutations require allowed Origin and X-Ozvault-Csrf: 1."
      }
    },
    "schemas": {
      "UploadRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "bucketId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "size": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2000100000
          },
          "encryption": {
            "type": "object",
            "properties": {
              "version": {
                "type": "number",
                "const": 1
              },
              "algorithm": {
                "type": "string",
                "const": "AES-256-GCM"
              },
              "salt": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "noncePrefix": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{11}$"
              },
              "chunkSize": {
                "type": "number",
                "const": 4194304
              },
              "plainSize": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2000000000
              }
            },
            "required": [
              "version",
              "algorithm",
              "salt",
              "noncePrefix",
              "chunkSize",
              "plainSize"
            ],
            "additionalProperties": false
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "bucketId",
          "name",
          "size",
          "encryption",
          "idempotencyKey"
        ],
        "additionalProperties": false
      },
      "Encryption": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "const": 1
          },
          "algorithm": {
            "type": "string",
            "const": "AES-256-GCM"
          },
          "salt": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "noncePrefix": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{11}$"
          },
          "chunkSize": {
            "type": "number",
            "const": 4194304
          },
          "plainSize": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2000000000
          }
        },
        "required": [
          "version",
          "algorithm",
          "salt",
          "noncePrefix",
          "chunkSize",
          "plainSize"
        ],
        "additionalProperties": false
      },
      "KeyRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "objects:read",
                "objects:write",
                "buckets:read",
                "buckets:write",
                "projects:read",
                "projects:write",
                "usage:read"
              ]
            }
          },
          "projectId": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "bucketId": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresInDays": {
            "default": 90,
            "type": "integer",
            "minimum": 1,
            "maximum": 365
          }
        },
        "required": [
          "name",
          "scopes",
          "projectId",
          "bucketId",
          "expiresInDays"
        ],
        "additionalProperties": false
      },
      "StoredObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "bucket_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Ciphertext bytes as a PostgreSQL bigint string"
          },
          "encryption": {
            "$ref": "#/components/schemas/Encryption"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "bucket_id",
          "name",
          "size",
          "encryption",
          "sha256",
          "created_at",
          "deleted_at"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "requestId"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    },
    "responses": {
      "Error": {
        "description": "Validation, authentication, scope, quota, capacity or server error. Typical HTTP statuses: 400, 401, 403, 404, 409 (offset/idempotency conflict), 410 (expired), 413 (quota/size), 422 (checksum), 429 (rate/concurrency), 503 (unavailable), 507 (disk capacity).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "UNAUTHENTICATED",
                "message": "Sign in to continue",
                "requestId": "5230d5de-6834-4d96-a794-a063b8750259"
              }
            }
          }
        }
      }
    }
  }
}