{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/verifyref-com/json-schema/verifyref-com-create-survey-request-schema.json",
  "title": "CreateSurveyRequest",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/verifyref-com-openapi.yml#/components/schemas/CreateSurveyRequest",
  "type": "object",
  "required": [
    "title",
    "recipients",
    "questions"
  ],
  "properties": {
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "anonymous": {
      "type": "boolean"
    },
    "recipients": {
      "type": "array",
      "minItems": 1,
      "maxItems": 500,
      "items": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "questions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/Question"
      }
    }
  },
  "$defs": {
    "Question": {
      "type": "object",
      "required": [
        "text",
        "type",
        "order"
      ],
      "properties": {
        "text": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "TEXT",
            "TEXTAREA",
            "RATING",
            "MULTIPLE_CHOICE",
            "YES_NO"
          ]
        },
        "required": {
          "type": "boolean",
          "default": true
        },
        "order": {
          "type": "number"
        },
        "options": {
          "type": "string",
          "description": "Required for MULTIPLE_CHOICE (serialized choices)"
        }
      }
    }
  }
}