{
  "openapi": "3.1.0",
  "info": {
    "title": "Uptimely free tools API",
    "version": "1.0.0",
    "description": "No-key endpoints behind Uptimely's free tools. No authentication; CORS open to every origin; JSON by default and Markdown with `Accept: text/markdown`; errors are RFC 9457 problem details. Each address may make 30 calls a minute and 300 a day. Documentation: https://getuptimely.com/docs/free-tools-api",
    "contact": {
      "name": "Uptimely support",
      "url": "https://getuptimely.com",
      "email": "support@devino.ca"
    }
  },
  "servers": [
    {
      "url": "https://getuptimely.com",
      "description": "Production"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Free tools",
      "description": "Free, no-key tools. Rate limited per address."
    }
  ],
  "externalDocs": {
    "url": "https://getuptimely.com/docs/free-tools-api"
  },
  "paths": {
    "/api/tools/check": {
      "get": {
        "operationId": "checkSite",
        "summary": "Is a site up right now?",
        "description": "Requests the site's home page once (following up to 5 redirects, ports 80 and 443 only) and reports whether it answered, its status, response time and HTTPS certificate. One live request per site per minute, shared by every caller.",
        "tags": [
          "Free tools"
        ],
        "security": [],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "A domain (`example.com`) or an http(s) address; the path is ignored.",
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "example": "example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The check ran (or a result under a minute old was reused). A site that is down is still a 200: the finding is in `verdict`.",
            "headers": {
              "X-Tool-Docs": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResult"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "`missing_url` (https://getuptimely.com/docs/free-tools-api#problem-missing_url), `invalid_url` (https://getuptimely.com/docs/free-tools-api#problem-invalid_url), `invalid_body` (https://getuptimely.com/docs/free-tools-api#problem-invalid_body)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large` (https://getuptimely.com/docs/free-tools-api#problem-payload_too_large)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type` (https://getuptimely.com/docs/free-tools-api#problem-unsupported_media_type)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "`blocked_address` (https://getuptimely.com/docs/free-tools-api#problem-blocked_address)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited` (https://getuptimely.com/docs/free-tools-api#problem-rate_limited)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "`internal` (https://getuptimely.com/docs/free-tools-api#problem-internal)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "`busy` (https://getuptimely.com/docs/free-tools-api#problem-busy)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "checkSitePost",
        "summary": "Is a site up right now? (JSON body)",
        "tags": [
          "Free tools"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The check ran (or a result under a minute old was reused). A site that is down is still a 200: the finding is in `verdict`.",
            "headers": {
              "X-Tool-Docs": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResult"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "`missing_url` (https://getuptimely.com/docs/free-tools-api#problem-missing_url), `invalid_url` (https://getuptimely.com/docs/free-tools-api#problem-invalid_url), `invalid_body` (https://getuptimely.com/docs/free-tools-api#problem-invalid_body)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large` (https://getuptimely.com/docs/free-tools-api#problem-payload_too_large)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type` (https://getuptimely.com/docs/free-tools-api#problem-unsupported_media_type)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "`blocked_address` (https://getuptimely.com/docs/free-tools-api#problem-blocked_address)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited` (https://getuptimely.com/docs/free-tools-api#problem-rate_limited)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "`internal` (https://getuptimely.com/docs/free-tools-api#problem-internal)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "`busy` (https://getuptimely.com/docs/free-tools-api#problem-busy)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details.",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "https://getuptimely.com/docs/free-tools-api#problem-<code>"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "missing_url",
              "invalid_url",
              "invalid_body",
              "unsupported_media_type",
              "payload_too_large",
              "blocked_address",
              "rate_limited",
              "internal",
              "busy"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Present on invalid_url: why the address was refused."
          }
        }
      },
      "CheckResult": {
        "type": "object",
        "required": [
          "tool",
          "target",
          "verdict",
          "summary",
          "checkedAt",
          "cached",
          "ageSeconds",
          "cacheTtlSeconds",
          "links"
        ],
        "properties": {
          "tool": {
            "const": "is-it-down"
          },
          "target": {
            "type": "object",
            "properties": {
              "scheme": {
                "enum": [
                  "https",
                  "http"
                ]
              },
              "host": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The site root that was requested."
              }
            }
          },
          "verdict": {
            "enum": [
              "up",
              "down"
            ],
            "description": "down = no answer, or an HTTP 5xx answer."
          },
          "summary": {
            "type": "string",
            "description": "The verdict in one sentence."
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "http": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": "integer"
              },
              "statusText": {
                "type": "string"
              },
              "finalUrl": {
                "type": "string",
                "format": "uri"
              },
              "responseTimeMs": {
                "type": "integer"
              },
              "redirects": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "location": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "failure": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "reason": {
                "enum": [
                  "dns_failed",
                  "dns_unavailable",
                  "connection_refused",
                  "connection_reset",
                  "timeout",
                  "tls_failed",
                  "connection_failed",
                  "too_many_redirects"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          },
          "certificate": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "validTo": {
                "type": "string",
                "format": "date-time"
              },
              "daysLeft": {
                "type": "integer"
              },
              "issuer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trusted": {
                "type": "boolean"
              },
              "problem": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cached": {
            "type": "boolean"
          },
          "ageSeconds": {
            "type": "integer"
          },
          "cacheTtlSeconds": {
            "const": 60
          },
          "vantage": {
            "type": "string"
          },
          "links": {
            "type": "object",
            "properties": {
              "page": {
                "type": "string",
                "format": "uri"
              },
              "monitor": {
                "type": "string",
                "format": "uri"
              },
              "docs": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}