{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/twelfth-ai/main/json-schema/twelfth-ai-tasks-response-schema.json",
  "title": "TasksResponse",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twelfth-ai-openapi.json#/components/schemas/TasksResponse",
  "type": "object",
  "required": [
    "tasks"
  ],
  "properties": {
    "tasks": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/$defs/Task"
      }
    }
  },
  "additionalProperties": true,
  "$defs": {
    "Task": {
      "type": "object",
      "required": [
        "id",
        "title",
        "details",
        "dueAt",
        "bookKey",
        "assigneeName",
        "assigneeEmail",
        "sourceSessionId",
        "sourceTitle",
        "sourceSummary",
        "sourceKind"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable task identifier."
        },
        "title": {
          "type": "string",
          "description": "Short description of the work."
        },
        "details": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional task context when available."
        },
        "dueAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Due time in RFC 3339 format, or null when the task has no due date."
        },
        "bookKey": {
          "type": [
            "string",
            "null"
          ],
          "description": "Buying-remit key, or null for a workspace-wide task."
        },
        "assigneeName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display name of the assignee, when assigned."
        },
        "assigneeEmail": {
          "type": [
            "string",
            "null"
          ],
          "format": "email",
          "description": "Email address of the assignee, when assigned."
        },
        "sourceSessionId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Identifier of the work unit that produced the task, when applicable."
        },
        "sourceTitle": {
          "type": [
            "string",
            "null"
          ],
          "description": "Title of the source work unit, when applicable."
        },
        "sourceSummary": {
          "type": [
            "string",
            "null"
          ],
          "description": "Summary of the source work unit, when available."
        },
        "sourceKind": {
          "type": [
            "string",
            "null"
          ],
          "description": "Extensible source-work-unit kind, when applicable."
        }
      },
      "additionalProperties": true
    }
  }
}