{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wakatime/json-schema/wakatime-goal-schema.json",
  "title": "Goal",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wakatime-goals-api-openapi.yml#/components/schemas/Goal",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "coding_activity",
        "project",
        "language"
      ]
    },
    "delta": {
      "type": "string",
      "enum": [
        "day",
        "week"
      ]
    },
    "seconds": {
      "type": "integer",
      "description": "Goal threshold in seconds."
    },
    "status": {
      "type": "string",
      "enum": [
        "success",
        "fail",
        "pending",
        "ignored"
      ]
    },
    "cumulative_status": {
      "type": "string"
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "editors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "is_enabled": {
      "type": "boolean"
    },
    "is_inverse": {
      "type": "boolean"
    },
    "is_snoozed": {
      "type": "boolean"
    },
    "ignore_days": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "modified_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "snooze_until": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "chart_data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "actual_seconds": {
            "type": "number",
            "format": "float"
          },
          "actual_seconds_text": {
            "type": "string"
          },
          "goal_seconds": {
            "type": "integer"
          },
          "goal_seconds_text": {
            "type": "string"
          },
          "range": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date"
              },
              "start": {
                "type": "string",
                "format": "date-time"
              },
              "end": {
                "type": "string",
                "format": "date-time"
              },
              "text": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              }
            }
          },
          "range_status": {
            "type": "string"
          },
          "range_status_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "range_status_reason_short": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "average_status": {
      "type": "string"
    },
    "owner": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "format": "email"
        },
        "photo": {
          "type": "string",
          "format": "uri"
        },
        "username": {
          "type": [
            "string",
            "null"
          ]
        },
        "full_name": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "shared_with": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "status_changed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "subscribers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "email_frequency": {
            "type": "string"
          }
        }
      }
    }
  }
}