{
  "$id": "https://intentschema.org/intents/productivity/tasks/item/create/v1.json",
  "fqdn": "org.intentschema.productivity.tasks.item.create.v1",
  "title": "Create task item",
  "description": "Creates a new task in a to-do list.",
  "payload": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
      "target",
      "object"
    ],
    "properties": {
      "target": {
        "$ref": "https://intentschema.org/common/target/v1.json"
      },
      "object": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "due_at": {
            "type": "string",
            "format": "date-time"
          },
          "priority": {
            "enum": [
              "low",
              "normal",
              "high"
            ]
          },
          "list_id": {
            "type": "string",
            "description": "Optional list/project identifier. Defaults to the provider's primary list."
          }
        }
      },
      "idempotency_key": {
        "type": "string"
      }
    }
  },
  "result": {
    "type": "object",
    "required": [
      "external_id"
    ],
    "properties": {
      "external_id": {
        "type": "string"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "examples": [
    {
      "name": "simple task",
      "value": {
        "target": {
          "system": "google_tasks"
        },
        "object": {
          "title": "Draft Q3 board update"
        }
      }
    },
    {
      "name": "task with due date and priority",
      "value": {
        "target": {
          "system": "google_tasks"
        },
        "object": {
          "title": "Send expense report",
          "notes": "Approver: Finance.",
          "due_at": "2026-04-25T17:00:00-07:00",
          "priority": "high"
        }
      }
    }
  ]
}
