{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nirvanahq-com/json-schema/nirvanahq-com-update-task-body-schema.json",
  "title": "UpdateTaskBody",
  "description": "All fields are optional — only include fields that need to change. `type` is not accepted (type cannot be changed on an existing item). Recurring template tasks (state=recurring) cannot be updated.\n",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nirvanahq-com-openapi.yaml#/components/schemas/UpdateTaskBody",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 1000
    },
    "note": {
      "type": "string",
      "maxLength": 100000
    },
    "state": {
      "type": "string",
      "enum": [
        "inbox",
        "next",
        "waiting",
        "scheduled",
        "someday",
        "later",
        "logbook",
        "trash",
        "active",
        "reference"
      ],
      "description": "State transitions apply side effects automatically. See operation description for full rules and combination constraints. For a project, `inbox` and `next` are stored as `active`. `trash` makes any item a plain trashed task with no parent and no star, and a trashed project or reference list takes its children with it. A reference list or item takes only `reference` or `trash`. Moving an item into a reference list (`parentid`) makes it a reference item in `reference` and clears its dates, effort, repeat and waiting-for; its star and reminder are kept. Moving one into a project with no state given puts it in `next` if it was in inbox, reference or trash. `inbox` on a task that is (or ends up) in a project is a 400: use `next`, or `parentid: \"\"` with `inbox` to take it out of the project.\n"
    },
    "tags": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "maxLength": 100
      },
      "description": "Full replacement — any tags not listed will be removed."
    },
    "starred": {
      "type": "boolean"
    },
    "duedate": {
      "type": "string",
      "format": "date",
      "description": "Pass empty string to clear."
    },
    "startdate": {
      "type": "string",
      "format": "date",
      "description": "Pass \"\" to clear. Required (in this request or already set) when state is \"scheduled\". Cannot be set when state is \"next\".\n"
    },
    "reminder": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(:\\d{2})?(\\.\\d+)?(Z|[+-]\\d{2}:?\\d{2})?$",
      "description": "When to remind the user: an ISO 8601 date-time, e.g. \"2026-03-28T09:00:00-05:00\", or \"2026-03-28T09:00\" to use the account's current UTC offset. That offset is today's, so give an explicit offset for a date across a daylight-saving change. Must be in the future. Pass \"\" or null to clear. Not allowed on completed, logged, trashed or recurring-template rows. Allowed on reference lists and items: when it fires, the apps star the row into Focus. Delivered by the Nirvana apps on the user's devices; the server sends nothing.\n"
    },
    "waitingfor": {
      "type": "string",
      "maxLength": 100,
      "description": "Person or entity being waited on. Only valid when state is \"waiting\" (current or being set in this request). Pass \"\" to clear. Moving away from \"waiting\" state auto-clears this field.\n"
    },
    "energy": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3,
      "description": "Effort level: 0=routine, 1=low, 2=medium, 3=high"
    },
    "etime": {
      "type": "integer",
      "description": "Estimated time in minutes (e.g. 15, 30, 60, 90, 120)"
    }
  }
}