{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsmileapi/json-schema/getsmileapi-archive-create-request-schema.json",
  "title": "ArchiveCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsmileapi-archives-api-openapi.yml#/components/schemas/ArchiveCreateRequest",
  "type": "object",
  "required": [
    "files"
  ],
  "properties": {
    "userId": {
      "type": "string",
      "description": "User ID associated with this archive. If null, then Smile will create a new user associated with this archive"
    },
    "fileType": {
      "$ref": "#/$defs/FileTypeId"
    },
    "rawFiles": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/FileObject"
      }
    }
  },
  "$defs": {
    "FileObject": {
      "type": "object",
      "required": [
        "fileContent",
        "fileExtensionType"
      ],
      "properties": {
        "fileSubtype": {
          "$ref": "#/$defs/FileSubtype"
        },
        "fileName": {
          "type": "string",
          "description": "raw file name. If null, then Smile will use the file name from the fileType."
        },
        "fileExtensionType": {
          "type": "string",
          "description": "raw file type",
          "enum": [
            "PDF",
            "PNG",
            "JPG",
            "JPEG"
          ]
        },
        "fileContent": {
          "type": "string",
          "description": "Archive file content, use base64 of file byte data"
        }
      }
    },
    "FileSubtype": {
      "type": "string",
      "enum": [
        "PAYSLIP",
        "PERSONAL_INFORMATION",
        "EMPLOYMENT_INFORMATION",
        "TAX_PAYMENT",
        "COMPANY_ID_FRONT",
        "COMPANY_ID_BACK",
        "CARD_FRONT",
        "CARD_BACK"
      ]
    },
    "FileTypeId": {
      "title": "FileTypeId",
      "type": "string",
      "description": "Upload file type. You can get all types from `/fileTypes` api"
    }
  }
}