{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/greenhouse/json-schema/greenhouse-application-create-schema.json",
  "title": "ApplicationCreate",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/greenhouse-applications-api-openapi.yml#/components/schemas/ApplicationCreate",
  "type": "object",
  "required": [
    "job_id"
  ],
  "properties": {
    "job_id": {
      "type": "integer"
    },
    "source_id": {
      "type": "integer"
    },
    "initial_stage_id": {
      "type": "integer"
    },
    "referrer": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "outside",
            "id",
            "email"
          ]
        },
        "value": {
          "type": "string"
        }
      }
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Attachment"
      }
    }
  },
  "$defs": {
    "Attachment": {
      "type": "object",
      "required": [
        "filename",
        "type"
      ],
      "properties": {
        "filename": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string",
          "enum": [
            "resume",
            "cover_letter",
            "admin_only",
            "public",
            "offer_letter",
            "take_home_test",
            "offer_packet"
          ]
        },
        "content": {
          "type": "string",
          "description": "Base64 file content."
        },
        "content_type": {
          "type": "string"
        }
      }
    }
  }
}