{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/timely/main/json-schema/timely-v1-forecast-schema.json",
  "title": "V1.Forecast",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/timely-openapi.json#/components/schemas/V1.Forecast",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique identifier for the task"
    },
    "note": {
      "type": "string",
      "description": "Task note (same as title, for backwards compatibility)"
    },
    "title": {
      "type": "string",
      "description": "Task title"
    },
    "description": {
      "type": [
        "null",
        "string"
      ],
      "description": "Detailed description of the task"
    },
    "from": {
      "type": "string",
      "description": "Start date in ISO 8601 format"
    },
    "to": {
      "type": "string",
      "description": "End date in ISO 8601 format"
    },
    "user": {
      "type": [
        "object",
        "null"
      ],
      "description": "Primary user assigned to the task",
      "properties": {
        "id": {
          "type": [
            "null",
            "integer"
          ]
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "avatar": {
          "type": "object",
          "properties": {
            "large_retina": {
              "type": [
                "null",
                "string"
              ]
            },
            "large": {
              "type": [
                "null",
                "string"
              ]
            },
            "medium_retina": {
              "type": [
                "null",
                "string"
              ]
            },
            "medium": {
              "type": [
                "null",
                "string"
              ]
            },
            "timeline": {
              "type": [
                "null",
                "string"
              ]
            }
          },
          "required": [
            "large_retina",
            "large",
            "medium_retina",
            "medium",
            "timeline"
          ]
        },
        "updated_at": {
          "type": [
            "null",
            "string"
          ]
        },
        "estimated_minutes": {
          "type": "integer"
        },
        "estimated_duration": {
          "type": "object",
          "properties": {
            "hours": {
              "type": "integer"
            },
            "minutes": {
              "type": "integer"
            },
            "seconds": {
              "type": "integer"
            },
            "formatted": {
              "type": "string",
              "minLength": 1
            },
            "total_hours": {
              "type": "number"
            },
            "total_seconds": {
              "type": "integer"
            },
            "total_minutes": {
              "type": "integer"
            }
          },
          "required": [
            "hours",
            "minutes",
            "seconds",
            "formatted",
            "total_hours",
            "total_seconds",
            "total_minutes"
          ]
        },
        "weekly_capacity": {
          "type": "number"
        },
        "work_days": {
          "type": [
            "null",
            "string"
          ]
        },
        "weekdays": {
          "type": [
            "null",
            "string"
          ]
        }
      },
      "required": [
        "id",
        "email",
        "name",
        "avatar",
        "updated_at"
      ]
    },
    "users": {
      "type": "array",
      "description": "All users assigned to the task",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "integer"
            ]
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "avatar": {
            "type": "object",
            "properties": {
              "large_retina": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "large": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "medium_retina": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "medium": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "timeline": {
                "type": [
                  "null",
                  "string"
                ]
              }
            },
            "required": [
              "large_retina",
              "large",
              "medium_retina",
              "medium",
              "timeline"
            ]
          },
          "updated_at": {
            "type": [
              "null",
              "string"
            ]
          },
          "estimated_minutes": {
            "type": "integer"
          },
          "estimated_duration": {
            "type": "object",
            "properties": {
              "hours": {
                "type": "integer"
              },
              "minutes": {
                "type": "integer"
              },
              "seconds": {
                "type": "integer"
              },
              "formatted": {
                "type": "string",
                "minLength": 1
              },
              "total_hours": {
                "type": "number"
              },
              "total_seconds": {
                "type": "integer"
              },
              "total_minutes": {
                "type": "integer"
              }
            },
            "required": [
              "hours",
              "minutes",
              "seconds",
              "formatted",
              "total_hours",
              "total_seconds",
              "total_minutes"
            ]
          },
          "weekly_capacity": {
            "type": "number"
          },
          "work_days": {
            "type": [
              "null",
              "string"
            ]
          },
          "weekdays": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "avatar",
          "updated_at"
        ]
      }
    },
    "project": {
      "type": "object",
      "description": "Project this task belongs to",
      "properties": {
        "id": {
          "type": "integer"
        },
        "active": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "client": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "active": {
              "type": "boolean"
            },
            "external_id": {
              "type": [
                "null",
                "string"
              ]
            },
            "updated_at": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "name",
            "color",
            "active",
            "updated_at"
          ]
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "active",
        "name",
        "color",
        "client",
        "updated_at"
      ]
    },
    "estimated_minutes": {
      "type": "integer",
      "description": "Estimated time in minutes"
    },
    "updated_at": {
      "type": "string",
      "description": "ISO 8601 timestamp of last modification"
    },
    "created_at": {
      "type": "string",
      "description": "ISO 8601 timestamp when task was created"
    },
    "label_ids": {
      "type": "array",
      "description": "Tags/categories applied to this task",
      "items": {
        "type": "integer"
      }
    },
    "estimated_duration": {
      "type": "object",
      "description": "Estimated duration for the task",
      "properties": {
        "hours": {
          "type": "integer"
        },
        "minutes": {
          "type": "integer"
        },
        "seconds": {
          "type": "integer"
        },
        "formatted": {
          "type": "string",
          "minLength": 1
        },
        "total_hours": {
          "type": "number"
        },
        "total_seconds": {
          "type": "integer"
        },
        "total_minutes": {
          "type": "integer"
        }
      },
      "required": [
        "hours",
        "minutes",
        "seconds",
        "formatted",
        "total_hours",
        "total_seconds",
        "total_minutes"
      ]
    },
    "planned_duration": {
      "type": "object",
      "description": "Planned duration for the task",
      "properties": {
        "hours": {
          "type": "integer"
        },
        "minutes": {
          "type": "integer"
        },
        "seconds": {
          "type": "integer"
        },
        "formatted": {
          "type": "string",
          "minLength": 1
        },
        "total_hours": {
          "type": "number"
        },
        "total_seconds": {
          "type": "integer"
        },
        "total_minutes": {
          "type": "integer"
        }
      },
      "required": [
        "hours",
        "minutes",
        "seconds",
        "formatted",
        "total_hours",
        "total_seconds",
        "total_minutes"
      ]
    },
    "logged_duration": {
      "type": "object",
      "description": "Time already logged against this task",
      "properties": {
        "hours": {
          "type": "integer"
        },
        "minutes": {
          "type": "integer"
        },
        "seconds": {
          "type": "integer"
        },
        "formatted": {
          "type": "string",
          "minLength": 1
        },
        "total_hours": {
          "type": "number"
        },
        "total_seconds": {
          "type": "integer"
        },
        "total_minutes": {
          "type": "integer"
        }
      },
      "required": [
        "hours",
        "minutes",
        "seconds",
        "formatted",
        "total_hours",
        "total_seconds",
        "total_minutes"
      ]
    },
    "completed": {
      "type": "boolean",
      "description": "Whether the task is marked as completed"
    },
    "completed_at": {
      "type": [
        "null",
        "string"
      ],
      "description": "ISO 8601 timestamp when task was completed"
    },
    "manage": {
      "type": "boolean",
      "description": "True if current user can edit/delete this task"
    },
    "external_id": {
      "type": [
        "null",
        "string"
      ],
      "description": "Your system's identifier for integration mapping"
    },
    "parent_title": {
      "type": [
        "null",
        "string"
      ],
      "description": "Title of the parent task (for subtasks)"
    }
  },
  "required": [
    "id",
    "note",
    "title",
    "from",
    "to",
    "users",
    "project",
    "estimated_minutes",
    "updated_at",
    "created_at",
    "label_ids",
    "estimated_duration",
    "planned_duration",
    "logged_duration",
    "completed",
    "manage"
  ]
}