{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateUserRequest",
  "title": "CreateUserRequest",
  "type": "object",
  "description": "Payload to create a new Control Room user account",
  "required": [
    "username",
    "email",
    "password"
  ],
  "properties": {
    "username": {
      "type": "string",
      "description": "Unique username for the new user"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Email address associated with the user account"
    },
    "password": {
      "type": "string",
      "description": "Initial password for the user (not required for SSO-only users)"
    },
    "firstName": {
      "type": "string",
      "description": "User's first name"
    },
    "lastName": {
      "type": "string",
      "description": "User's last name"
    },
    "roles": {
      "type": "array",
      "description": "List of role IDs to assign to the user",
      "items": {
        "$ref": "#/components/schemas/RoleRef"
      }
    },
    "licenseFeatures": {
      "type": "array",
      "description": "License feature types assigned to the user (e.g., ATTENDED, UNATTENDED)",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the user account is active and can log in"
    }
  }
}