{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commsharbor/json-schema/commsharbor-page-platform-task-schema.json",
  "title": "PagePlatformTask",
  "description": "Cursor-paginated listing. A null cursor means this was the last page.",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commsharbor-platform-api-openapi.yml#/components/schemas/PagePlatformTask",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PlatformTask"
      },
      "description": "The records on this page."
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Cursor for the next page; null when there are no more."
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "PlatformTask": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Task ID."
        },
        "title": {
          "type": "string",
          "description": "What has to be done."
        },
        "status": {
          "type": "string",
          "description": "Current state."
        },
        "lead_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Lead the task belongs to."
        },
        "due_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "When it is due (UTC)."
        },
        "assignee_user_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Who is responsible."
        },
        "created_at": {
          "type": "string",
          "description": "Creation time (UTC)."
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Last change (UTC)."
        },
        "url": {
          "type": "string",
          "description": "Absolute URL of this task."
        }
      },
      "required": [
        "id",
        "title",
        "status",
        "lead_id",
        "due_at",
        "assignee_user_id",
        "created_at",
        "updated_at",
        "url"
      ],
      "description": "Work on a platform lead. Same idea as a CRM task, different subject: this one is about a prospective tenant, not about a tenant's customer."
    }
  }
}