{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compelling-ai/json-schema/compelling-ai-job-schema.json",
  "title": "Job",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compelling-ai-openapi.yml#/components/schemas/Job",
  "type": "object",
  "properties": {
    "job_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "complete",
        "failed"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "contact_generation",
        "account_insight_answers",
        "contact_insight_answers",
        "workflow_run"
      ]
    },
    "list_id": {
      "type": "string"
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Error message if status is `failed`."
    },
    "result": {
      "type": [
        "object",
        "null"
      ],
      "description": "Summary or result data when status is `complete`.",
      "additionalProperties": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}