{
  "openapi": "3.1.0",
  "info": {
    "title": "Uptime Timmy API",
    "version": "1.0.0",
    "description": "Read and manage a workspace's monitors, incidents, maintenance windows and status.\n\nMake a key under **API** in the workspace (owners and admins). Send it as `Authorization: Bearer <key>`. A key belongs to one workspace and is read-only or read/write. 60 requests a minute per key (see the X-RateLimit headers); over that you get 429 with Retry-After.\n\nSuccess bodies are `{\"data\": …}`, lists add `next_cursor`. Errors are `{\"error\": {\"code\", \"message\"}}`. Times are RFC 3339 in UTC. Bodies must be `application/json`, up to 64 KB, with known fields only."
  },
  "servers": [
    {
      "url": "https://www.uptimetimmy.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Monitors"
    },
    {
      "name": "Incidents"
    },
    {
      "name": "Maintenance"
    },
    {
      "name": "Status"
    }
  ],
  "paths": {
    "/monitors": {
      "get": {
        "summary": "List monitors",
        "description": "Every monitor in the workspace, domain monitors included.",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_monitors",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "enum": [
                "http",
                "port",
                "ping",
                "dns",
                "heartbeat",
                "domain"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "enum": [
                "pending",
                "up",
                "degraded",
                "down"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Monitor"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "summary": "Add a monitor",
        "description": "Needs a read/write key. Validated exactly as the dashboard's forms. A new heartbeat's response includes its ping_url, shown once.",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "post_monitors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/HttpMonitor"
                        },
                        {
                          "$ref": "#/components/schemas/PortMonitor"
                        },
                        {
                          "$ref": "#/components/schemas/PingMonitor"
                        },
                        {
                          "$ref": "#/components/schemas/DnsMonitor"
                        },
                        {
                          "$ref": "#/components/schemas/CreatedHeartbeat"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/monitors/{id}": {
      "get": {
        "summary": "Get a monitor",
        "description": "",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_monitors_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "summary": "Change a monitor",
        "description": "Needs a read/write key. Send only what changes. Pause or resume with paused. Domain monitors can't be changed here.",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "patch_monitors_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "delete": {
        "summary": "Delete a monitor",
        "description": "Needs a read/write key. Its check history and incidents go with it.",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "delete_monitors_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/monitors/{id}/checks": {
      "get": {
        "summary": "A monitor's checks",
        "description": "Newest first, one row per platform that checked. Checks are kept 90 days.",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_monitors_by_id_checks",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "From next_cursor of the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Check"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass as ?cursor= for the next page; null on the last."
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/monitors/{id}/stats": {
      "get": {
        "summary": "A monitor's stats",
        "description": "Uptime, incidents and response times over a recent period or a calendar month in a single request, with the response times down-sampled for a chart. For 7 or 30 days this replaces paging through the checks. Send period or month, not both. Checks are kept 90 days, so response times reach no further back; uptime and incidents come from incidents and cover any month.",
        "tags": [
          "Monitors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_monitors_by_id_stats",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1h",
                "24h",
                "7d",
                "30d",
                "90d"
              ],
              "default": "24h"
            },
            "description": "How far back from now. Default 24h when month isn't sent."
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            },
            "description": "A calendar month (YYYY-MM), for a monthly report: its first day to the next month's, or to now for the current month. Past months work too."
          },
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "UTC"
            },
            "description": "With month: the IANA time zone its days are counted in, e.g. Africa/Johannesburg."
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "description": "Narrow the response times to one platform. Uptime is the monitor's either way."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitorStats"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/incidents": {
      "get": {
        "summary": "List incidents",
        "description": "Newest first.",
        "tags": [
          "Incidents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_incidents",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "enum": [
                "open",
                "resolved"
              ]
            }
          },
          {
            "name": "monitor_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "From next_cursor of the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Incident"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass as ?cursor= for the next page; null on the last."
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/incidents/{id}": {
      "get": {
        "summary": "Get an incident",
        "description": "",
        "tags": [
          "Incidents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_incidents_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Incident"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/maintenance-windows": {
      "get": {
        "summary": "List maintenance windows",
        "description": "",
        "tags": [
          "Maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_maintenance_windows",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MaintenanceWindow"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "summary": "Add a maintenance window",
        "description": "Needs a read/write key. No incidents open and no alerts go out for the covered monitors while it runs; uptime skips it.",
        "tags": [
          "Maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "post_maintenance_windows",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaintenanceWindowInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MaintenanceWindow"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/maintenance-windows/{id}": {
      "get": {
        "summary": "Get a maintenance window",
        "description": "",
        "tags": [
          "Maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_maintenance_windows_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MaintenanceWindow"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "summary": "Change a maintenance window",
        "description": "Needs a read/write key. Takes effect at once, even for a window that's running.",
        "tags": [
          "Maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "patch_maintenance_windows_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaintenanceWindowUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MaintenanceWindow"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "delete": {
        "summary": "Delete a maintenance window",
        "description": "Needs a read/write key. Deleting a running window ends it.",
        "tags": [
          "Maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "delete_maintenance_windows_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/status": {
      "get": {
        "summary": "Workspace status",
        "description": "The workspace at a glance.",
        "tags": [
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "operationId": "get_status",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Status"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key: utk_ followed by 43 characters."
      }
    },
    "headers": {
      "RateLimit-Limit": {
        "schema": {
          "type": "integer"
        },
        "description": "Requests allowed per minute."
      },
      "RateLimit-Remaining": {
        "schema": {
          "type": "integer"
        },
        "description": "Left in this window."
      },
      "RateLimit-Reset": {
        "schema": {
          "type": "integer"
        },
        "description": "Unix time the window ends."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing, malformed, unknown or revoked key.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "A read-only key tried to change data.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource in this workspace.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request itself is malformed: bad JSON, an unknown field, a field of the wrong type, a missing required field or a bad query parameter.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Invalid": {
        "description": "The body is well-formed but a rule refuses it: the same rules as the dashboard, with the same messages. That includes a check interval shorter than the plan allows (5 minutes on Free).",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "The workspace is at a limit: the monitors its plan holds (10 on Free, 50 on Solo, 150 on Team, 500 on Agency) or 100 maintenance windows.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unavailable": {
        "description": "A feature the request needs isn't switched on for this deployment.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Over the limit for this key.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          },
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds until the window resets."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable and machine-readable: unauthorized, forbidden, not_found, invalid_request, invalid_json, unsupported_media_type, payload_too_large, validation_failed, limit_reached, rate_limited, internal_error, unavailable."
              },
              "message": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "error"
        ]
      },
      "HttpMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "http"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "degraded",
              "down"
            ],
            "description": "pending: not checked yet. up: On time. degraded: Delayed. down: Cancelled."
          },
          "paused": {
            "type": "boolean"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Inside a maintenance window now: no incidents open and no alerts go out."
          },
          "maintenance_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime_24h": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the last 24 hours not spent in a Cancelled incident, 0 to 1, with maintenance taken out."
          },
          "uptime_7d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 7 days."
          },
          "uptime_30d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 30 days."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "maxLength": 2048
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "HEAD"
            ]
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 3000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          },
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "The page must contain (or not contain) this, case-insensitively, in its first 1 MB. Needs method GET."
          },
          "keyword_mode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "contains",
              "absent",
              null
            ]
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "additionalProperties": false
            },
            "description": "Extra request headers, by name only: values are write-only and never returned."
          },
          "auth": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "basic",
                      "bearer"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              }
            ],
            "description": "How the request signs in, without the secret (write-only), or null."
          },
          "last_response_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_status_code": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "name",
          "status",
          "paused",
          "in_maintenance",
          "maintenance_ends_at",
          "last_checked_at",
          "uptime_24h",
          "uptime_7d",
          "uptime_30d",
          "created_at",
          "updated_at",
          "url",
          "method",
          "interval_seconds",
          "timeout_ms",
          "slow_ms",
          "regions",
          "keyword",
          "keyword_mode",
          "headers",
          "auth"
        ]
      },
      "PortMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "port"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "degraded",
              "down"
            ],
            "description": "pending: not checked yet. up: On time. degraded: Delayed. down: Cancelled."
          },
          "paused": {
            "type": "boolean"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Inside a maintenance window now: no incidents open and no alerts go out."
          },
          "maintenance_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime_24h": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the last 24 hours not spent in a Cancelled incident, 0 to 1, with maintenance taken out."
          },
          "uptime_7d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 7 days."
          },
          "uptime_30d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 30 days."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 1000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          },
          "last_response_ms": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "name",
          "status",
          "paused",
          "in_maintenance",
          "maintenance_ends_at",
          "last_checked_at",
          "uptime_24h",
          "uptime_7d",
          "uptime_30d",
          "created_at",
          "updated_at",
          "host",
          "port",
          "interval_seconds",
          "timeout_ms",
          "slow_ms",
          "regions"
        ]
      },
      "PingMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "ping"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "degraded",
              "down"
            ],
            "description": "pending: not checked yet. up: On time. degraded: Delayed. down: Cancelled."
          },
          "paused": {
            "type": "boolean"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Inside a maintenance window now: no incidents open and no alerts go out."
          },
          "maintenance_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime_24h": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the last 24 hours not spent in a Cancelled incident, 0 to 1, with maintenance taken out."
          },
          "uptime_7d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 7 days."
          },
          "uptime_30d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 30 days."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "host": {
            "type": "string",
            "description": "A public host name or IP address. Timmy sends 3 ping packets from each platform: Up if any come back, Delayed if the average round trip is past slow_ms, Cancelled if none do."
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 500."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          },
          "last_response_ms": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "name",
          "status",
          "paused",
          "in_maintenance",
          "maintenance_ends_at",
          "last_checked_at",
          "uptime_24h",
          "uptime_7d",
          "uptime_30d",
          "created_at",
          "updated_at",
          "host",
          "interval_seconds",
          "timeout_ms",
          "slow_ms",
          "regions"
        ]
      },
      "DnsMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "dns"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "degraded",
              "down"
            ],
            "description": "pending: not checked yet. up: On time. degraded: Delayed. down: Cancelled."
          },
          "paused": {
            "type": "boolean"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Inside a maintenance window now: no incidents open and no alerts go out."
          },
          "maintenance_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime_24h": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the last 24 hours not spent in a Cancelled incident, 0 to 1, with maintenance taken out."
          },
          "uptime_7d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 7 days."
          },
          "uptime_30d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 30 days."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "record_name": {
            "type": "string"
          },
          "record_type": {
            "type": "string",
            "enum": [
              "A",
              "AAAA",
              "MX",
              "TXT",
              "CNAME",
              "NS"
            ]
          },
          "expected": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 20,
            "description": "The record set must be exactly these, in any order. MX is written \"10 mail.example.com\". On create, leave it out to use what the name answers now."
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 1000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          },
          "last_response_ms": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "name",
          "status",
          "paused",
          "in_maintenance",
          "maintenance_ends_at",
          "last_checked_at",
          "uptime_24h",
          "uptime_7d",
          "uptime_30d",
          "created_at",
          "updated_at",
          "record_name",
          "record_type",
          "expected",
          "interval_seconds",
          "timeout_ms",
          "slow_ms",
          "regions"
        ]
      },
      "HeartbeatMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "heartbeat"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "degraded",
              "down"
            ],
            "description": "pending: not checked yet. up: On time. degraded: Delayed. down: Cancelled."
          },
          "paused": {
            "type": "boolean"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Inside a maintenance window now: no incidents open and no alerts go out."
          },
          "maintenance_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime_24h": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the last 24 hours not spent in a Cancelled incident, 0 to 1, with maintenance taken out."
          },
          "uptime_7d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 7 days."
          },
          "uptime_30d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 30 days."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              300,
              600,
              900,
              1800,
              3600,
              7200,
              21600,
              43200,
              86400,
              604800
            ],
            "description": "How often a ping is expected. Default 3600."
          },
          "grace_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400,
            "multipleOf": 60,
            "description": "How late a ping may be before it counts as missed. Default 600."
          },
          "last_ping_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "name",
          "status",
          "paused",
          "in_maintenance",
          "maintenance_ends_at",
          "last_checked_at",
          "uptime_24h",
          "uptime_7d",
          "uptime_30d",
          "created_at",
          "updated_at",
          "interval_seconds",
          "grace_seconds"
        ]
      },
      "DomainMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "const": "domain"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "degraded",
              "down"
            ],
            "description": "pending: not checked yet. up: On time. degraded: Delayed. down: Cancelled."
          },
          "paused": {
            "type": "boolean"
          },
          "in_maintenance": {
            "type": "boolean",
            "description": "Inside a maintenance window now: no incidents open and no alerts go out."
          },
          "maintenance_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime_24h": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the last 24 hours not spent in a Cancelled incident, 0 to 1, with maintenance taken out."
          },
          "uptime_7d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 7 days."
          },
          "uptime_30d": {
            "type": [
              "number",
              "null"
            ],
            "description": "The same over the last 30 days."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "name",
          "status",
          "paused",
          "in_maintenance",
          "maintenance_ends_at",
          "last_checked_at",
          "uptime_24h",
          "uptime_7d",
          "uptime_30d",
          "created_at",
          "updated_at"
        ],
        "description": "Watches a domain's expiry. Read-only through the API."
      },
      "Monitor": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/HttpMonitor"
          },
          {
            "$ref": "#/components/schemas/PortMonitor"
          },
          {
            "$ref": "#/components/schemas/PingMonitor"
          },
          {
            "$ref": "#/components/schemas/DnsMonitor"
          },
          {
            "$ref": "#/components/schemas/HeartbeatMonitor"
          },
          {
            "$ref": "#/components/schemas/DomainMonitor"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "http": "#/components/schemas/HttpMonitor",
            "port": "#/components/schemas/PortMonitor",
            "ping": "#/components/schemas/PingMonitor",
            "dns": "#/components/schemas/DnsMonitor",
            "heartbeat": "#/components/schemas/HeartbeatMonitor",
            "domain": "#/components/schemas/DomainMonitor"
          }
        }
      },
      "HttpMonitorInput": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "http"
          },
          "name": {
            "type": "string",
            "maxLength": 80,
            "description": "Shown on the board and in alerts. Defaults to the target."
          },
          "url": {
            "type": "string",
            "maxLength": 2048
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "HEAD"
            ]
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 3000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          },
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "The page must contain (or not contain) this, case-insensitively, in its first 1 MB. Needs method GET."
          },
          "keyword_mode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "contains",
              "absent",
              null
            ]
          },
          "headers": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 100,
                      "description": "Not Host, Content-Length, Transfer-Encoding, Connection, Keep-Alive, Upgrade, TE, Trailer, Proxy-*, Authorization (use auth) or User-Agent."
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            ],
            "description": "Extra request headers, sent to the URL's own origin only (a redirect to another origin goes without them). Values are write-only and encrypted at rest. On PATCH, leaving this out keeps them; sending it replaces the whole set, so send every value; null or [] removes them. Headers and sign-in together are at most 8,192 characters. Answers 503 unavailable when the server has no encryption key."
          },
          "auth": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "basic"
                  },
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "type",
                  "username",
                  "password"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "bearer"
                  },
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "type",
                  "token"
                ],
                "additionalProperties": false
              }
            ],
            "description": "Sign in with basic or bearer authentication (sent as Authorization, to the URL's own origin only). Write-only and encrypted at rest. On PATCH, leaving it out keeps it; null removes it."
          }
        },
        "additionalProperties": false,
        "required": [
          "kind",
          "url"
        ]
      },
      "PortMonitorInput": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "port"
          },
          "name": {
            "type": "string",
            "maxLength": 80,
            "description": "Shown on the board and in alerts. Defaults to the target."
          },
          "host": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 1000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          }
        },
        "additionalProperties": false,
        "required": [
          "kind",
          "host",
          "port"
        ]
      },
      "PingMonitorInput": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "ping"
          },
          "name": {
            "type": "string",
            "maxLength": 80,
            "description": "Shown on the board and in alerts. Defaults to the target."
          },
          "host": {
            "type": "string",
            "description": "A public host name or IP address. Timmy sends 3 ping packets from each platform: Up if any come back, Delayed if the average round trip is past slow_ms, Cancelled if none do."
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 500."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          }
        },
        "additionalProperties": false,
        "required": [
          "kind",
          "host"
        ],
        "description": "Needs the ping workers to be switched on; until then creating one answers 503 unavailable."
      },
      "DnsMonitorInput": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "dns"
          },
          "name": {
            "type": "string",
            "maxLength": 80,
            "description": "Shown on the board and in alerts. Defaults to the target."
          },
          "record_name": {
            "type": "string"
          },
          "record_type": {
            "type": "string",
            "enum": [
              "A",
              "AAAA",
              "MX",
              "TXT",
              "CNAME",
              "NS"
            ]
          },
          "expected": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 20,
            "description": "The record set must be exactly these, in any order. MX is written \"10 mail.example.com\". On create, leave it out to use what the name answers now."
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              120,
              300,
              600,
              1800,
              3600
            ],
            "description": "Seconds between checks. Default 300."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 1000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          }
        },
        "additionalProperties": false,
        "required": [
          "kind",
          "record_name",
          "record_type"
        ]
      },
      "HeartbeatMonitorInput": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "heartbeat"
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              300,
              600,
              900,
              1800,
              3600,
              7200,
              21600,
              43200,
              86400,
              604800
            ],
            "description": "How often a ping is expected. Default 3600."
          },
          "grace_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400,
            "multipleOf": 60,
            "description": "How late a ping may be before it counts as missed. Default 600."
          }
        },
        "additionalProperties": false,
        "required": [
          "kind"
        ]
      },
      "MonitorInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/HttpMonitorInput"
          },
          {
            "$ref": "#/components/schemas/PortMonitorInput"
          },
          {
            "$ref": "#/components/schemas/PingMonitorInput"
          },
          {
            "$ref": "#/components/schemas/DnsMonitorInput"
          },
          {
            "$ref": "#/components/schemas/HeartbeatMonitorInput"
          }
        ],
        "discriminator": {
          "propertyName": "kind"
        }
      },
      "MonitorUpdate": {
        "type": "object",
        "additionalProperties": false,
        "description": "Any of the monitor's own fields (the ones POST accepts, except kind) and paused. What you leave out stays as it is. Naming another record_name or record_type on a DNS monitor without expected re-reads the answer.",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "description": "Shown on the board and in alerts. Defaults to the target."
          },
          "url": {
            "type": "string",
            "maxLength": 2048
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "HEAD"
            ]
          },
          "interval_seconds": {
            "type": "integer",
            "enum": [
              60,
              300,
              600,
              900,
              1800,
              3600,
              7200,
              21600,
              43200,
              86400,
              604800
            ],
            "description": "How often a ping is expected. Default 3600."
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "description": "Cancelled after this many milliseconds. Default 10000."
          },
          "slow_ms": {
            "type": "integer",
            "minimum": 100,
            "maximum": 30000,
            "description": "Delayed after this many milliseconds (at most timeout_ms). Default 1000."
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lhr1",
                "iad1",
                "fra1",
                "sin1"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "description": "Where the monitor is checked from. The first is the primary; the others confirm problems. Default iad1, fra1, sin1."
          },
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "The page must contain (or not contain) this, case-insensitively, in its first 1 MB. Needs method GET."
          },
          "keyword_mode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "contains",
              "absent",
              null
            ]
          },
          "headers": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 100,
                      "description": "Not Host, Content-Length, Transfer-Encoding, Connection, Keep-Alive, Upgrade, TE, Trailer, Proxy-*, Authorization (use auth) or User-Agent."
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            ],
            "description": "Extra request headers, sent to the URL's own origin only (a redirect to another origin goes without them). Values are write-only and encrypted at rest. On PATCH, leaving this out keeps them; sending it replaces the whole set, so send every value; null or [] removes them. Headers and sign-in together are at most 8,192 characters. Answers 503 unavailable when the server has no encryption key."
          },
          "auth": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "basic"
                  },
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "type",
                  "username",
                  "password"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "bearer"
                  },
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "type",
                  "token"
                ],
                "additionalProperties": false
              }
            ],
            "description": "Sign in with basic or bearer authentication (sent as Authorization, to the URL's own origin only). Write-only and encrypted at rest. On PATCH, leaving it out keeps it; null removes it."
          },
          "host": {
            "type": "string",
            "description": "A public host name or IP address. Timmy sends 3 ping packets from each platform: Up if any come back, Delayed if the average round trip is past slow_ms, Cancelled if none do."
          },
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "record_name": {
            "type": "string"
          },
          "record_type": {
            "type": "string",
            "enum": [
              "A",
              "AAAA",
              "MX",
              "TXT",
              "CNAME",
              "NS"
            ]
          },
          "expected": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 20,
            "description": "The record set must be exactly these, in any order. MX is written \"10 mail.example.com\". On create, leave it out to use what the name answers now."
          },
          "grace_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400,
            "multipleOf": 60,
            "description": "How late a ping may be before it counts as missed. Default 600."
          },
          "paused": {
            "type": "boolean",
            "description": "Pause or resume checking."
          }
        }
      },
      "CreatedHeartbeat": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HeartbeatMonitor"
          },
          {
            "type": "object",
            "properties": {
              "ping_url": {
                "type": "string",
                "format": "uri",
                "description": "The secret URL the job requests (GET, POST or HEAD). Shown only in this response."
              }
            },
            "additionalProperties": false,
            "required": [
              "ping_url"
            ]
          }
        ]
      },
      "Incident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "monitor_id": {
            "type": "string",
            "format": "uuid"
          },
          "monitor_name": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "degraded",
              "down"
            ],
            "description": "degraded: Delayed. down: Cancelled."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "cause": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "duration_seconds": {
            "type": "integer"
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentNote"
            },
            "description": "What people in the workspace wrote about the incident, newest first. Read-only in the API."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "monitor_id",
          "monitor_name",
          "severity",
          "status",
          "cause",
          "started_at",
          "resolved_at",
          "duration_seconds",
          "notes"
        ]
      },
      "IncidentNote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": "string",
            "maxLength": 1000,
            "description": "Plain text."
          },
          "author": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the person who wrote it; null once they've left."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "edited_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "body",
          "author",
          "created_at",
          "edited_at"
        ]
      },
      "Check": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "result": {
            "type": "string",
            "enum": [
              "up",
              "slow",
              "down"
            ]
          },
          "status_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "response_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "region",
          "result",
          "status_code",
          "response_ms",
          "error",
          "checked_at"
        ]
      },
      "MonitorStats": {
        "type": "object",
        "properties": {
          "monitor_id": {
            "type": "string",
            "format": "uuid"
          },
          "period": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "1h",
              "24h",
              "7d",
              "30d",
              "90d",
              null
            ],
            "description": "Null when month was asked for."
          },
          "month": {
            "type": [
              "string",
              "null"
            ],
            "description": "YYYY-MM when a month was asked for, else null."
          },
          "time_zone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The zone the month's days are counted in; null for a period."
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "The end of the window: when the request was answered, or the start of the next month."
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "lhr1",
              "iad1",
              "fra1",
              "sin1",
              null
            ],
            "description": "The platform response times are narrowed to; null for all of them."
          },
          "uptime": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of the period not spent in a Cancelled incident, 0 to 1, with maintenance taken out and counted from the monitor's creation if that's later. Null when none of it was watched."
          },
          "incidents": {
            "type": "integer",
            "description": "Incidents (Delayed or Cancelled) open at any time in the period."
          },
          "down_minutes": {
            "type": "integer",
            "description": "Minutes in Cancelled incidents, maintenance taken out."
          },
          "response_ms": {
            "type": "object",
            "properties": {
              "avg": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "min": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "max": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "avg",
              "min",
              "max"
            ],
            "additionalProperties": false,
            "description": "Over every answered check in the period. Cancelled checks have no meaningful response time and are left out. Null without any (heartbeats and domains never have one)."
          },
          "bucket_minutes": {
            "type": "integer",
            "description": "How long each series point averages: 0 (every check) for 1h, 15 for 24h, 120 for 7d, 360 for 30d, 1440 for 90d and for a month (whose points are its days in time_zone)."
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The bucket's start (UTC-aligned; the first is clamped to from)."
                },
                "avg_ms": {
                  "type": "number"
                },
                "checks": {
                  "type": "integer",
                  "description": "Answered checks averaged into the point."
                }
              },
              "required": [
                "at",
                "avg_ms",
                "checks"
              ],
              "additionalProperties": false
            },
            "description": "Response times oldest first, a point per bucket that had answered checks. At most about 150 points."
          }
        },
        "required": [
          "monitor_id",
          "period",
          "month",
          "time_zone",
          "from",
          "to",
          "region",
          "uptime",
          "incidents",
          "down_minutes",
          "response_ms",
          "bucket_minutes",
          "series"
        ],
        "additionalProperties": false,
        "description": "A monitor's availability and response times over a recent period."
      },
      "OnceSchedule": {
        "type": "object",
        "properties": {
          "type": {
            "const": "once"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "description": "On a whole minute."
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "description": "On a whole minute, 1 minute to 7 days after the start."
          }
        },
        "additionalProperties": false,
        "required": [
          "type",
          "starts_at",
          "ends_at"
        ]
      },
      "WeeklySchedule": {
        "type": "object",
        "properties": {
          "type": {
            "const": "weekly"
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "minItems": 1,
            "description": "ISO weekdays, 1 = Monday to 7 = Sunday."
          },
          "start_time": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "description": "Local wall-clock time in time_zone; it stays 02:00 across daylight saving."
          },
          "duration_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10080
          },
          "time_zone": {
            "type": "string",
            "description": "An IANA zone such as Europe/London."
          }
        },
        "additionalProperties": false,
        "required": [
          "type",
          "weekdays",
          "start_time",
          "duration_minutes",
          "time_zone"
        ]
      },
      "Schedule": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/OnceSchedule"
          },
          {
            "$ref": "#/components/schemas/WeeklySchedule"
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "Span": {
        "type": "object",
        "properties": {
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "starts_at",
          "ends_at"
        ]
      },
      "MaintenanceWindow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shown on status pages."
          },
          "all_monitors": {
            "type": "boolean"
          },
          "monitor_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Empty when all_monitors is true."
          },
          "schedule": {
            "$ref": "#/components/schemas/Schedule"
          },
          "active": {
            "type": "boolean",
            "description": "Running now."
          },
          "current": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Span"
              },
              {
                "type": "null"
              }
            ]
          },
          "next": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Span"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "note",
          "all_monitors",
          "monitor_ids",
          "schedule",
          "active",
          "current",
          "next"
        ]
      },
      "MaintenanceWindowInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          },
          "all_monitors": {
            "type": "boolean",
            "description": "Default true."
          },
          "monitor_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Needed when all_monitors is false."
          },
          "schedule": {
            "$ref": "#/components/schemas/Schedule"
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "schedule"
        ]
      },
      "MaintenanceWindowUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          },
          "all_monitors": {
            "type": "boolean"
          },
          "monitor_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "schedule": {
            "$ref": "#/components/schemas/Schedule"
          }
        },
        "additionalProperties": false,
        "description": "What you leave out stays as it is. A schedule replaces the old one whole."
      },
      "Status": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "slug",
              "name"
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "major_outage",
              "maintenance"
            ],
            "description": "major_outage if anything is Cancelled, else degraded if anything is Delayed, else maintenance if everything watched is in a window, else operational."
          },
          "counts": {
            "type": "object",
            "properties": {
              "monitors": {
                "type": "integer"
              },
              "on_time": {
                "type": "integer"
              },
              "delayed": {
                "type": "integer"
              },
              "cancelled": {
                "type": "integer"
              },
              "pending": {
                "type": "integer"
              },
              "paused": {
                "type": "integer"
              },
              "maintenance": {
                "type": "integer"
              }
            },
            "additionalProperties": false,
            "required": [
              "monitors",
              "on_time",
              "delayed",
              "cancelled",
              "pending",
              "paused",
              "maintenance"
            ],
            "description": "Domain-only monitors aren't counted."
          },
          "open_incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Incident"
            }
          },
          "active_maintenance": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ends_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "name",
                "note",
                "ends_at"
              ]
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "workspace",
          "generated_at",
          "state",
          "counts",
          "open_incidents",
          "active_maintenance"
        ]
      }
    }
  }
}
