{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-tasks/json-schema/google-tasks-task-schema.json",
  "title": "Task",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-tasks-tasks-api-openapi.yml#/components/schemas/Task",
  "properties": {
    "completed": {
      "type": "string",
      "description": "Completion date of the task (as a RFC 3339 timestamp). This field is omitted if the task has not been completed."
    },
    "selfLink": {
      "type": "string",
      "description": "Output only. URL pointing to this task. Used to retrieve, update, or delete this task.",
      "readOnly": true
    },
    "id": {
      "description": "Task identifier.",
      "type": "string"
    },
    "webViewLink": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. An absolute link to the task in the Google Tasks Web UI."
    },
    "parent": {
      "description": "Output only. Parent task identifier. This field is omitted if it is a top-level task. Use the \"move\" method to move the task under a different parent or to the top level. A parent task can never be an assigned task (from Chat Spaces, Docs). This field is read-only.",
      "readOnly": true,
      "type": "string"
    },
    "notes": {
      "description": "Notes describing the task. Tasks assigned from Google Docs cannot have notes. Optional. Maximum length allowed: 8192 characters.",
      "type": "string"
    },
    "links": {
      "description": "Output only. Collection of links. This collection is read-only.",
      "type": "array",
      "readOnly": true,
      "items": {
        "properties": {
          "link": {
            "type": "string",
            "description": "The URL."
          },
          "description": {
            "description": "The description (might be empty).",
            "type": "string"
          },
          "type": {
            "description": "Type of the link, e.g. \"email\", \"generic\", \"chat_message\", \"keep_note\".",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "kind": {
      "description": "Output only. Type of the resource. This is always \"tasks#task\".",
      "readOnly": true,
      "type": "string"
    },
    "status": {
      "description": "Status of the task. This is either \"needsAction\" or \"completed\".",
      "type": "string"
    },
    "etag": {
      "description": "ETag of the resource.",
      "type": "string"
    },
    "due": {
      "description": "Scheduled date for the task (as an RFC 3339 timestamp). Optional. This represents the day that the task should be done, or that the task is visible on the calendar grid. It doesn't represent the deadline of the task. Only date information is recorded; the time portion of the timestamp is discarded when setting this field. It isn't possible to read or write the time that a task is scheduled for using the API.",
      "type": "string"
    },
    "updated": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. Last modification time of the task (as a RFC 3339 timestamp)."
    },
    "position": {
      "type": "string",
      "description": "Output only. String indicating the position of the task among its sibling tasks under the same parent task or at the top level. If this string is greater than another task's corresponding position string according to lexicographical ordering, the task is positioned after the other task under the same parent task (or at the top level). Use the \"move\" method to move the task to another position.",
      "readOnly": true
    },
    "hidden": {
      "description": "Flag indicating whether the task is hidden. This is the case if the task had been marked completed when the task list was last cleared. The default is False. This field is read-only.",
      "type": "boolean"
    },
    "title": {
      "type": "string",
      "description": "Title of the task. Maximum length allowed: 1024 characters."
    },
    "deleted": {
      "description": "Flag indicating whether the task has been deleted. For assigned tasks this field is read-only. They can only be deleted by calling tasks.delete, in which case both the assigned task and the original task (in Docs or Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there. The default is False.",
      "type": "boolean"
    },
    "assignmentInfo": {
      "$ref": "#/$defs/AssignmentInfo",
      "description": "Output only. Context information for assigned tasks. A task can be assigned to a user, currently possible from surfaces like Docs and Chat Spaces. This field is populated for tasks assigned to the current user and identifies where the task was assigned from. This field is read-only."
    }
  },
  "type": "object",
  "$defs": {
    "AssignmentInfo": {
      "description": "Information about the source of the task assignment (Document, Chat Space).",
      "type": "object",
      "properties": {
        "surfaceType": {
          "description": "Output only. The type of surface this assigned task originates from. Currently limited to DOCUMENT or SPACE.",
          "type": "string",
          "readOnly": true,
          "enum": [
            "CONTEXT_TYPE_UNSPECIFIED",
            "GMAIL",
            "DOCUMENT",
            "SPACE"
          ]
        },
        "spaceInfo": {
          "$ref": "#/$defs/SpaceInfo",
          "description": "Output only. Information about the Chat Space where this task originates from. This field is read-only."
        },
        "linkToTask": {
          "readOnly": true,
          "description": "Output only. An absolute link to the original task in the surface of assignment (Docs, Chat spaces, etc.).",
          "type": "string"
        },
        "driveResourceInfo": {
          "$ref": "#/$defs/DriveResourceInfo",
          "description": "Output only. Information about the Drive file where this task originates from. Currently, the Drive file can only be a document. This field is read-only."
        }
      }
    },
    "DriveResourceInfo": {
      "description": "Information about the Drive resource where a task was assigned from (the document, sheet, etc.).",
      "type": "object",
      "properties": {
        "resourceKey": {
          "description": "Output only. Resource key required to access files shared via a shared link. Not required for all files. See also developers.google.com/drive/api/guides/resource-keys.",
          "type": "string",
          "readOnly": true
        },
        "driveFileId": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Identifier of the file in the Drive API."
        }
      }
    },
    "SpaceInfo": {
      "description": "Information about the Chat Space where a task was assigned from.",
      "type": "object",
      "properties": {
        "space": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The Chat space where this task originates from. The format is \"spaces/{space}\"."
        }
      }
    }
  }
}