{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateHeartbeatRequest",
  "title": "CreateHeartbeatRequest",
  "type": "object",
  "required": [
    "name",
    "interval",
    "intervalUnit",
    "enabled"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the heartbeat."
    },
    "description": {
      "type": "string",
      "description": "Description of what the heartbeat monitors."
    },
    "interval": {
      "type": "integer",
      "minimum": 1,
      "description": "Interval duration for the heartbeat ping."
    },
    "intervalUnit": {
      "type": "string",
      "enum": [
        "minutes",
        "hours",
        "days"
      ],
      "description": "Unit for the heartbeat interval."
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the heartbeat is active."
    },
    "ownerTeam": {
      "type": "object",
      "description": "Team that owns the heartbeat.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Team ID."
        },
        "name": {
          "type": "string",
          "description": "Team name."
        }
      }
    },
    "alertMessage": {
      "type": "string",
      "description": "Custom alert message when the heartbeat expires."
    },
    "alertTags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Tags to add to the alert created by an expired heartbeat."
    },
    "alertPriority": {
      "type": "string",
      "enum": [
        "P1",
        "P2",
        "P3",
        "P4",
        "P5"
      ],
      "description": "Priority of the alert created by an expired heartbeat."
    }
  }
}