{
  "$id": "https://docs.honeybadger.io/guides/integrations/payloads/v2/check_in_missing.schema.json",
  "title": "check_in_missing webhook payload (v2)",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "#/$defs/WebhookV2CheckInEvent",
  "$defs": {
    "WebhookV2CheckInEvent": {
      "description": "A check-in missed its schedule, or started reporting again.",
      "allOf": [
        {
          "$ref": "#/$defs/WebhookV2Event"
        },
        {
          "type": "object",
          "required": [
            "project",
            "check_in"
          ],
          "properties": {
            "event": {
              "type": "string",
              "enum": [
                "check_in_missing",
                "check_in_reporting"
              ]
            },
            "project": {
              "$ref": "#/$defs/WebhookV2Project"
            },
            "check_in": {
              "$ref": "#/$defs/WebhookV2CheckIn"
            }
          }
        }
      ]
    },
    "WebhookV2Event": {
      "type": "object",
      "description": "The fields every v2 webhook body carries. Each event adds the records it's about. A v2 body has no `payload_version`; that's how it differs from the later versions.\n",
      "required": [
        "event",
        "message"
      ],
      "not": {
        "required": [
          "payload_version"
        ]
      },
      "properties": {
        "event": {
          "type": "string",
          "description": "The event's name, the same as its key under `webhooks`.",
          "examples": [
            "occurred"
          ]
        },
        "message": {
          "type": "string",
          "description": "A one-line summary of the event, as notifications show it."
        },
        "actor": {
          "allOf": [
            {
              "$ref": "#/$defs/WebhookV2User"
            }
          ],
          "description": "The person who caused the event. Absent when Honeybadger, or an API token with no user, did."
        }
      }
    },
    "WebhookV2User": {
      "type": "object",
      "description": "A Honeybadger user, or an account by its owner's details.",
      "required": [
        "id",
        "email",
        "name"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "examples": [
            4821
          ]
        },
        "email": {
          "type": "string",
          "examples": [
            "jane@example.com"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "examples": [
            "Jane Doe"
          ]
        }
      }
    },
    "WebhookV2Project": {
      "type": "object",
      "description": "The project the event belongs to.",
      "required": [
        "id",
        "name",
        "created_at",
        "disable_public_links",
        "pivotal_project_id",
        "asana_workspace_id",
        "token",
        "github_project",
        "environments",
        "owner",
        "last_notice_at",
        "earliest_notice_at",
        "unresolved_fault_count",
        "fault_count",
        "active",
        "users",
        "sites",
        "team_id"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "examples": [
            1234
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "examples": [
            "Billing API"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "disable_public_links": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "pivotal_project_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "asana_workspace_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "token": {
          "type": "string",
          "description": "The project's ingestion key, the one its notifiers report with."
        },
        "github_project": {
          "type": [
            "string",
            "null"
          ],
          "description": "The repository of the project's newest GitHub integration.",
          "examples": [
            "acme/billing"
          ]
        },
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WebhookV2Environment"
          }
        },
        "owner": {
          "allOf": [
            {
              "$ref": "#/$defs/WebhookV2User"
            }
          ],
          "description": "The account that owns the project."
        },
        "last_notice_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "earliest_notice_at": {
          "type": "string",
          "format": "date-time",
          "description": "The oldest notice the plan's retention keeps."
        },
        "unresolved_fault_count": {
          "type": "integer"
        },
        "fault_count": {
          "type": "integer"
        },
        "active": {
          "type": "boolean",
          "description": "Whether the account is active."
        },
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WebhookV2User"
          }
        },
        "sites": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WebhookV2ProjectSite"
          }
        },
        "team_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The project's errors page. Sent on `volume_spike` only."
        }
      }
    },
    "WebhookV2Environment": {
      "type": "object",
      "description": "One of the project's environments.",
      "required": [
        "id",
        "project_id",
        "name",
        "notifications",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "project_id": {
          "type": "integer"
        },
        "name": {
          "type": "string",
          "examples": [
            "production"
          ]
        },
        "notifications": {
          "type": "boolean",
          "description": "Whether errors in this environment send notifications."
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "WebhookV2ProjectSite": {
      "type": "object",
      "description": "One of the project's uptime sites, in brief.",
      "required": [
        "id",
        "active",
        "last_checked_at",
        "name",
        "state",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "active": {
          "type": "boolean"
        },
        "last_checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "name": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "examples": [
            "up"
          ]
        },
        "url": {
          "type": "string",
          "description": "The checked URL, as entered."
        }
      }
    },
    "WebhookV2CheckIn": {
      "type": "object",
      "description": "The check-in the event is about.",
      "required": [
        "id",
        "name",
        "slug",
        "state",
        "schedule_type",
        "reported_at",
        "expected_at",
        "missed_count",
        "grace_period",
        "url",
        "details_url"
      ],
      "properties": {
        "id": {
          "type": "string",
          "examples": [
            "NeI9K5"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "slug": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": "string",
          "enum": [
            "pending",
            "reporting",
            "missing",
            "paused"
          ]
        },
        "schedule_type": {
          "type": "string",
          "enum": [
            "simple",
            "cron"
          ]
        },
        "reported_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "expected_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "missed_count": {
          "type": "integer"
        },
        "grace_period": {
          "type": "string",
          "description": "How late a report can be before the check-in is missing, as a duration such as `5 minutes`. Empty when there's no grace period.\n"
        },
        "report_period": {
          "type": "string",
          "description": "How often the job reports, as a duration such as `1 day`. Sent for `simple` check-ins."
        },
        "cron_schedule": {
          "type": "string",
          "description": "Sent for `cron` check-ins."
        },
        "cron_timezone": {
          "type": "string",
          "description": "Sent for `cron` check-ins."
        },
        "url": {
          "type": "string",
          "description": "The URL the job reports to."
        },
        "details_url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}
