{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anon-li/json-schema/anon-li-post-api-v1-form-request-schema.json",
  "title": "PostApiV1FormRequest",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/anon-li-openapi-generated.yml#/components/schemas/PostApiV1FormRequest",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Human‑readable title (1–300 chars)"
    },
    "description": {
      "type": "string",
      "description": "Shown above the form (≤ 2000 chars)"
    },
    "schema": {
      "type": "object",
      "description": "Form schema JSON (see documentation)"
    },
    "publicKey": {
      "type": "string",
      "description": "Base64url‑encoded raw P‑256 public key (87 chars)"
    },
    "wrappedPrivateKey": {
      "type": "string",
      "description": "Vault‑wrapped P‑256 private key (PKCS‑8 inside AES‑GCM)"
    },
    "vaultId": {
      "type": "string",
      "description": "Caller's current vault identity"
    },
    "vaultGeneration": {
      "type": "number",
      "description": "Caller's current vault generation"
    },
    "allowFileUploads": {
      "type": "boolean",
      "description": "Enable file‑attachment fields (default false)"
    },
    "maxFileSizeOverride": {
      "type": "number",
      "description": "Per‑upload byte cap override"
    },
    "maxSubmissions": {
      "type": "number",
      "description": "Stop accepting submissions after this many"
    },
    "closesAt": {
      "type": "string",
      "description": "ISO‑8601 date to close the form"
    },
    "hideBranding": {
      "type": "boolean",
      "description": "Remove anon.li branding (Pro only)"
    },
    "notifyOnSubmission": {
      "type": "boolean",
      "description": "Email the account owner when a new encrypted submission arrives (default true)"
    },
    "customKey": {
      "type": "boolean",
      "description": "Password‑protect the public form (Plus and Pro)"
    },
    "salt": {
      "type": "string",
      "description": "Required when customKey is true; salt for password‑derived key"
    },
    "customKeyData": {
      "type": "string",
      "description": "Password‑derived data (required when customKey is true)"
    },
    "customKeyIv": {
      "type": "string",
      "description": "IV for password‑derived encryption (required when customKey is true)"
    },
    "customKeyVerifier": {
      "type": "string",
      "description": "Hash of the decrypted password witness (required when customKey is true)"
    }
  },
  "required": [
    "title",
    "schema",
    "publicKey",
    "wrappedPrivateKey",
    "vaultId",
    "vaultGeneration"
  ]
}