{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "tasks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable across calls: kind and website id, or kind and workspace id for a workspace task."
          },
          "kind": {
            "type": "string",
            "enum": [
              "search_console_reconnect",
              "payment_problem",
              "page_down",
              "agent_access_request",
              "missing_links",
              "disavow_upload",
              "disavow_suggestions",
              "renewals_due",
              "plan_limit",
              "cant_reach_lasting",
              "setup_add_links",
              "setup_connect_agent",
              "setup_search_console"
            ]
          },
          "group": {
            "type": "string",
            "enum": [
              "needs_you",
              "setup"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "urgent",
              "normal",
              "low",
              "setup"
            ]
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The website domain; null for a workspace task."
          },
          "who": {
            "type": "string",
            "enum": [
              "you",
              "owner",
              "agent_or_you",
              "only_you"
            ],
            "description": "Who can act: you (a member with write access), owner, agent_or_you or only_you (the person's own sign-in elsewhere)."
          },
          "canAct": {
            "type": "boolean",
            "description": "Whether the person behind this credential can act, from their workspace role. agent.can says whether their agent can."
          },
          "title": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the task began: the oldest affected record. Null when unknown."
          },
          "route": {
            "type": "string",
            "description": "Console hash route where the task gets done; a website task carries website=."
          },
          "handoff": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "disavow_upload"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "get_handoff id with the steps, when the task happens on another website."
          },
          "agent": {
            "type": "object",
            "properties": {
              "can": {
                "type": "boolean",
                "description": "Whether the person's agent may do this task. Agents draft outreach and never send it."
              },
              "prompt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "A plain sentence the person can paste to their agent; it names the website, never an id."
              },
              "steps": {
                "description": "The exact commands for an agent task that has no handoff; with a handoff, get_handoff carries them.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "can",
              "prompt"
            ],
            "additionalProperties": false
          },
          "clears": {
            "type": "string",
            "description": "How the task clears: verified by data, or a deliberate accept action. Never a click."
          },
          "items": {
            "description": "Records in this bounded page.",
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "route": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "route"
              ],
              "additionalProperties": false,
              "description": "Records in this bounded page."
            }
          }
        },
        "required": [
          "id",
          "kind",
          "group",
          "priority",
          "projectId",
          "website",
          "who",
          "canAct",
          "title",
          "detail",
          "count",
          "since",
          "route",
          "handoff",
          "agent",
          "clears"
        ],
        "additionalProperties": false
      }
    },
    "counts": {
      "type": "object",
      "properties": {
        "urgent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "normal": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "low": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "setup": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "urgent",
        "normal",
        "low",
        "setup"
      ],
      "additionalProperties": false
    },
    "generatedAt": {
      "type": "string"
    },
    "truncated": {
      "type": "boolean",
      "description": "True when the workspace has more than 200 readable websites and only the first 200 were read."
    }
  },
  "required": [
    "tasks",
    "counts",
    "generatedAt",
    "truncated"
  ],
  "additionalProperties": {}
}
