{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coderpad/json-schema/coderpad-pad-create-request-schema.json",
  "title": "PadCreateRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coderpad-pads-api-openapi.yml#/components/schemas/PadCreateRequest",
  "allOf": [
    {
      "$ref": "#/$defs/PadWriteFields"
    },
    {
      "type": "object",
      "properties": {
        "question_id": {
          "type": "integer",
          "description": "A question from your question bank to start the pad with. Cannot be combined with `contents`."
        },
        "notes": {
          "type": "string",
          "description": "Private interviewer notes."
        },
        "team_id": {
          "type": "string",
          "format": "uuid",
          "description": "The team the pad belongs to."
        },
        "take_home": {
          "type": "boolean",
          "description": "Create a take-home pad, for questions usable in both live and take-home pads."
        },
        "take_home_time_limit": {
          "type": "integer",
          "description": "Take-home time limit, in minutes. Defaults to the question's time limit."
        },
        "ai_assist_enabled": {
          "type": "boolean",
          "description": "Enable AI Assist in the pad. Defaults to your organization's setting."
        }
      }
    }
  ],
  "$defs": {
    "PadWriteFields": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "language": {
          "type": "string",
          "description": "A single-file language key."
        },
        "contents": {
          "type": "string",
          "description": "The code to put in the pad."
        },
        "private": {
          "type": "boolean",
          "description": "Whether the waiting room is enabled, so that guests must be admitted before joining the pad."
        },
        "execution_enabled": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ],
          "description": "Whether code execution is enabled. Must be sent as the string `\"true\"` or `\"false\"`."
        },
        "restrict_interviewer_access": {
          "type": "boolean",
          "description": "Only let the owner and `allowed_interviewer_emails` join the pad as interviewers."
        },
        "allowed_interviewer_emails": {
          "type": "array",
          "description": "Users of the pad's organization allowed on the pad when `restrict_interviewer_access` is enabled. Replaces the current list.",
          "items": {
            "type": "string",
            "format": "email"
          }
        },
        "user_email": {
          "type": "string",
          "format": "email",
          "description": "Makes this user of your organization the pad owner. A new account is created if the email address belongs to one of your organization's domains and has no account yet. Organization owners only.\n"
        },
        "disable_coaching_tips": {
          "type": "boolean",
          "description": "Turn off interviewer coaching tips in the pad."
        }
      }
    }
  }
}