{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nirvanahq-com/json-schema/nirvanahq-com-create-task-body-schema.json",
  "title": "CreateTaskBody",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nirvanahq-com-openapi.yaml#/components/schemas/CreateTaskBody",
  "type": "object",
  "required": [
    "name"
  ],
  "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"
      ],
      "default": "inbox",
      "description": "GTD state. Rules: `scheduled` requires `startdate`; `next` and `startdate` cannot both be set; `waitingfor` requires `waiting`. For a project, `inbox` and `next` are stored as `active`. A task created inside a project (`parentid` is a project) with no state, or `inbox`, is stored as `next`: the Inbox holds unprocessed items only. With a `startdate` it needs `scheduled` (otherwise 400). A reference list or reference item is always stored as `reference`: omit state (or pass `reference`); any other state is a 400. `reference` on a task or project is a 400.\n"
    },
    "type": {
      "type": "string",
      "enum": [
        "task",
        "project",
        "reflist",
        "refitem",
        "reference_list",
        "reference_item"
      ],
      "default": "task",
      "description": "`reference_list` and `reference_item` (the spellings reads use) are accepted for `reflist` and `refitem`. A `refitem` needs a reflist `parentid`; any item created with a reflist parent becomes a refitem.\n"
    },
    "tags": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "maxLength": 100
      }
    },
    "starred": {
      "type": "boolean",
      "default": false
    },
    "duedate": {
      "type": "string",
      "format": "date"
    },
    "startdate": {
      "type": "string",
      "format": "date",
      "description": "Required 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\"."
    },
    "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)"
    },
    "parentid": {
      "type": "string",
      "description": "ID of a parent project"
    }
  }
}