{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/humanforai-dev/json-schema/humanforai-dev-task-schema.json",
  "title": "Task",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/humanforai-dev-api-openapi.json#/components/schemas/Task",
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/TaskStatus"
    },
    "task_type": {
      "$ref": "#/$defs/TaskType"
    },
    "description": {
      "type": "string"
    },
    "location_required": {
      "type": "boolean"
    },
    "location_detail": {
      "type": [
        "string",
        "null"
      ]
    },
    "deadline": {
      "type": [
        "string",
        "null"
      ]
    },
    "output_format": {
      "type": "string"
    },
    "budget_usd": {
      "type": "number",
      "deprecated": true
    },
    "requester": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "api",
        "web_form"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "status_history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/$defs/TaskStatus"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "operator_notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Notes from the human operator, when present. For delivery: status_poll tasks this is also where the deliverable arrives, and it is the exact text covered by deliverable_sha256."
    },
    "receipt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Signed deliverable receipt, present once status is delivered. Compact JWS (EdDSA/Ed25519) binding deliverable_sha256 and the lifecycle timestamps to this task_id. Verify offline against the public key at /.well-known/jwks.json — no account or callback needed. Proves integrity and origin; the timestamps inside are the service's own signed assertion, not third-party attested."
    },
    "deliverable_sha256": {
      "type": [
        "string",
        "null"
      ],
      "description": "sha256 (hex) of the UTF-8 bytes of operator_notes as delivered. Recompute it locally to confirm the deliverable was not altered."
    },
    "receipt_issued_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the receipt was signed. If the operator later edits the deliverable, the receipt is re-issued and this timestamp changes."
    }
  },
  "$defs": {
    "TaskStatus": {
      "type": "string",
      "description": "Lifecycle: submitted → accepted → delivered, with rejected reachable from any open state. Transitions are forward-only; delivered and rejected are final. The retired values under_review and in_progress are no longer emitted (v1.8.0) but are still accepted on PATCH, folded onto submitted and accepted respectively.",
      "enum": [
        "submitted",
        "accepted",
        "delivered",
        "rejected"
      ]
    },
    "TaskType": {
      "type": "string",
      "enum": [
        "real_world_verification",
        "product_or_app_testing",
        "human_judgment_and_feedback",
        "data_collection",
        "local_physical_task",
        "ai_output_review",
        "prompt_and_workflow_testing",
        "simulation_and_automation_testing",
        "accessibility_and_usability_check",
        "custom_human_in_the_loop"
      ]
    }
  }
}