{
  "components": {
    "schemas": {
      "BatchEncryptRequestDto": {
        "additionalProperties": false,
        "description": "Request for batch encryption of multiple data items.",
        "properties": {
          "items": {
            "description": "List of items to encrypt.",
            "items": {
              "$ref": "#/components/schemas/EncryptDataRequestDto"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "DecryptDataRequestDto": {
        "additionalProperties": false,
        "description": "Request to decrypt data using AES-256-GCM.\r\nWARNING: In production, decryption happens CLIENT-SIDE.",
        "properties": {
          "associatedData": {
            "description": "Optional associated data used during encryption (base64 encoded).",
            "nullable": true,
            "type": "string"
          },
          "authTag": {
            "description": "Authentication tag (base64 encoded, 16 bytes).",
            "minLength": 1,
            "type": "string"
          },
          "encryptedData": {
            "description": "Encrypted data (base64 encoded).",
            "minLength": 1,
            "type": "string"
          },
          "iv": {
            "description": "Initialization vector (base64 encoded, 12 bytes for GCM).",
            "minLength": 1,
            "type": "string"
          },
          "keyId": {
            "description": "Key ID used for decryption.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "authTag",
          "encryptedData",
          "iv",
          "keyId"
        ],
        "type": "object"
      },
      "EncryptDataRequestDto": {
        "additionalProperties": false,
        "description": "Request to encrypt data using AES-256-GCM.\r\nWARNING: In production, encryption happens CLIENT-SIDE.\r\nThis endpoint should only be used for testing/demonstration.",
        "properties": {
          "associatedData": {
            "description": "Optional associated data for authenticated encryption (base64 encoded).\r\nThis data is not encrypted but is authenticated.",
            "nullable": true,
            "type": "string"
          },
          "keyId": {
            "description": "Key ID to use for encryption.",
            "format": "uuid",
            "type": "string"
          },
          "plaintextData": {
            "description": "Plaintext data to encrypt (base64 encoded).\r\nCRITICAL: Never send unencrypted sensitive data to server in production!",
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "keyId",
          "plaintextData"
        ],
        "type": "object"
      },
      "ProblemDetails": {
        "additionalProperties": {},
        "properties": {
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "instance": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "contact": {
      "email": "support@essence-platform.com",
      "name": "Essence Platform"
    },
    "description": "Zero-knowledge encryption service for Essence Platform. CRITICAL: All encryption happens client-side. Server only manages metadata.",
    "title": "Essence Encryption API",
    "version": "v1"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/v1/encrypt": {
      "post": {
        "deprecated": true,
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EncryptDataRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EncryptDataRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EncryptDataRequestDto"
              }
            }
          }
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Gone"
          }
        },
        "summary": "Removed: server-side encryption is not available. Encrypt client-side instead.\r\nAlways returns HTTP 410 Gone with migration guidance (FR-01.021).",
        "tags": [
          "Encryption"
        ]
      }
    },
    "/api/v1/encrypt/batch": {
      "post": {
        "deprecated": true,
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BatchEncryptRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchEncryptRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchEncryptRequestDto"
              }
            }
          }
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Gone"
          }
        },
        "summary": "Removed: server-side batch encryption is not available. Encrypt client-side instead.\r\nAlways returns HTTP 410 Gone with migration guidance (FR-01.021).",
        "tags": [
          "Encryption"
        ]
      }
    },
    "/api/v1/encrypt/decrypt": {
      "post": {
        "deprecated": true,
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DecryptDataRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecryptDataRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DecryptDataRequestDto"
              }
            }
          }
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Gone"
          }
        },
        "summary": "Removed: server-side decryption is not available. Decrypt client-side instead.\r\nAlways returns HTTP 410 Gone with migration guidance (FR-01.021).",
        "tags": [
          "Encryption"
        ]
      }
    }
  }
}
