{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/verifly-email/json-schema/verifly-email-job-schema.json",
  "title": "Job",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/verifly-email-openapi.json#/components/schemas/Job",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "job_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "processing",
        "completed",
        "failed"
      ]
    },
    "progress": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "total_emails": {
      "type": "integer",
      "minimum": 0
    },
    "processed": {
      "type": "integer",
      "minimum": 0
    },
    "summary": {
      "$ref": "#/$defs/JobSummary"
    },
    "credits_used": {
      "type": "integer",
      "minimum": 0
    },
    "file_name": {
      "type": "string"
    },
    "error_message": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "results_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "download_url": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "success",
    "job_id",
    "status"
  ],
  "$defs": {
    "JobSummary": {
      "type": "object",
      "properties": {
        "valid": {
          "type": "integer",
          "minimum": 0
        },
        "invalid": {
          "type": "integer",
          "minimum": 0
        },
        "risky": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}