{"openapi":"3.1.0","info":{"title":"Upcheck API","description":"Everything the Upcheck dashboard can do, over HTTPS.\n\nUpcheck watches a website's uptime, TLS certificate, DNS records and domain registration, each on its own schedule — plus, once set, a keyword check on one page and a content check that watches a page for change — and delivers alerts by email, Slack, Discord, Microsoft Teams or webhook.\n\n## Authentication\n\nEvery request carries an organization API key as a bearer token: `Authorization: Bearer uck_...`. Keys are created under **Settings → API keys** in the dashboard and are scoped to one organization. A key is either `admin` (can change monitoring and alerting) or `member` (read-only); a read-only key gets `403` on every write.\n\n## Conventions\n\nTimestamps are Unix milliseconds. Errors are JSON: `{ \"error\": \"…\", \"code\": \"…\" }`. Lists that can grow without bound take `limit` and `offset`. Each key is limited to 300 requests per minute; a `429` carries `Retry-After` in seconds.","version":"1.0.0","contact":{"name":"Upcheck","url":"https://upcheck.so"}},"externalDocs":{"description":"Guides and the MCP server","url":"https://upcheck.so/api"},"servers":[{"url":"https://api.upcheck.so"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An organization API key, created in the dashboard under Settings → API keys."}},"schemas":{"Domain":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domain":{"type":"string","example":"www.example.com"},"friendlyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"type":"string"},"certificateStatus":{"type":"string","enum":["checking","healthy","expiring_soon","expired","invalid","unreachable"]},"certificateIssuer":{"type":"string"},"certificateExpiresAt":{"type":"number","description":"Unix ms."},"certificateDaysRemaining":{"type":"number"},"certificateLastChecked":{"type":"number"},"certificateNextCheck":{"type":"number"},"certificateAutoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"certificate":{"type":"object","properties":{"issuer":{"type":"string"},"commonName":{"type":"string"},"subjectAlternativeNames":{"type":"array","items":{"type":"string"}},"serialNumber":{"type":"string"},"signatureAlgorithm":{"type":"string"},"publicKeyType":{"type":"string"},"publicKeySize":{"type":"number"},"validFrom":{"type":"number","description":"Unix ms."},"expirationDate":{"type":"number","description":"Unix ms."},"fingerprintSha256":{"type":"string"},"sslVersion":{"type":"string"},"chain":{"type":"array","items":{"type":"object","properties":{"commonName":{"type":"string"},"issuer":{"type":"string"},"type":{"type":"string","enum":["leaf","intermediate","root"]}},"required":["commonName","issuer","type"],"additionalProperties":{}}}},"required":["issuer","commonName","subjectAlternativeNames","serialNumber","signatureAlgorithm","publicKeyType","publicKeySize","validFrom","expirationDate","fingerprintSha256","sslVersion","chain"],"additionalProperties":{}},"certificateLastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"registrationStatus":{"anyOf":[{"type":"string","enum":["checking","healthy","expiring_soon","expired","at_risk","unsupported","lookup_failed"]},{"type":"null"}]},"registrar":{"type":"string"},"registrationExpiresAt":{"type":"number"},"registrationDaysRemaining":{"type":"number"},"registration":{"anyOf":[{"type":"object","properties":{"registrableDomain":{"type":"string"},"registrar":{"type":"string"},"registrarUrl":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number","description":"Unix ms. 0 when the registry publishes no expiry."},"updatedAt":{"type":"number"},"statuses":{"type":"array","items":{"type":"string"}},"nameservers":{"type":"array","items":{"type":"string"}},"source":{"type":"string"}},"required":["registrableDomain","registrar","createdAt","expiresAt","updatedAt","statuses","nameservers","source"],"additionalProperties":{}},{"type":"null"}]},"registrationLastChecked":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationNextCheck":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationLastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","domain","friendlyName","hostname","certificateStatus","certificateIssuer","certificateExpiresAt","certificateDaysRemaining","certificateLastChecked","certificateNextCheck","certificateAutoRenew","certificate","certificateLastError","registrationStatus","registrar","registrationExpiresAt","registrationDaysRemaining","registration","registrationLastChecked","registrationNextCheck","registrationLastError"],"additionalProperties":{},"description":"A monitored website with the latest state of its certificate and registration."},"Monitor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"enabled":{"type":"boolean","description":"Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config."},"intervalMs":{"type":"number"},"nextCheck":{"type":"number","description":"Unix ms."},"lastChecked":{"type":"number"},"status":{"type":"string","enum":["checking","ok","warn","crit","unknown"]},"summary":{"type":"string"},"detail":{"anyOf":[{},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/KeywordConfig"},{"$ref":"#/components/schemas/ContentConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"$ref":"#/components/schemas/PortConfig"}]},{"type":"null"}],"description":"Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere."},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"failingSince":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","subject","enabled","intervalMs","nextCheck","lastChecked","status","summary","detail","config","lastError","consecutiveFailures","failingSince"],"additionalProperties":{},"description":"One scheduled check of one subject against one website."},"KeywordConfig":{"type":"object","properties":{"type":{"type":"string","const":"keyword"},"keyword":{"type":"string"},"mode":{"type":"string","enum":["present","absent"],"description":"What the page is expected to do with the text. `present`: it must contain the text, so the check fails when the text disappears (a login button, a product name). `absent`: it must not contain the text, so the check fails when the text appears (\"Database error\", \"Out of stock\")."},"caseSensitive":{"type":"boolean"},"path":{"type":"string"}},"required":["type","keyword","mode","caseSensitive","path"],"additionalProperties":{},"description":"What a keyword check looks for, and on which page."},"ContentConfig":{"type":"object","properties":{"type":{"type":"string","const":"content"},"path":{"type":"string"},"selector":{"type":"string"},"mode":{"type":"string","enum":["text","number","decrease","increase"],"description":"What the content check compares between probes. `text`: the selected text, so any change alerts. `number`: the first number in the selection, so a change to it alerts. `decrease`: only when that number goes down (a price drop). `increase`: only when it goes up."}},"required":["type","path","selector","mode"],"additionalProperties":{},"description":"Which page, which element, and what kind of change a content check watches."},"HttpConfig":{"type":"object","properties":{"type":{"type":"string","const":"http"},"path":{"type":"string"},"method":{"type":"string","enum":["GET","HEAD","POST"],"description":"How the uptime probe requests the page. `HEAD` skips the body, so it cannot be combined with `bodyContains`."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expectedStatuses":{"type":"array","items":{"type":"number"}},"bodyContains":{"type":"string"},"maxResponseMs":{"type":"number"}},"required":["type","path","method","headers","expectedStatuses","bodyContains","maxResponseMs"],"additionalProperties":{},"description":"How the uptime check requests the website and what counts as up. Absent on a website probed at its root over GET."},"PortConfig":{"type":"object","properties":{"type":{"type":"string","const":"port"},"host":{"type":"string","description":"Empty means the website's own hostname."},"ports":{"type":"array","items":{"type":"number"}}},"required":["type","host","ports"],"additionalProperties":{},"description":"Which host and TCP ports a port check connects to."},"Check":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"monitorId":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},{"type":"null"}]},"timestamp":{"type":"number","description":"Unix ms."},"subject":{"anyOf":[{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},{"type":"null"}]},"result":{"type":"string","enum":["healthy","renewed","expiring_soon","expired","validation_failed","unreachable","at_risk","unsupported","lookup_failed","up","down","changed","passed","failed","unknown"]},"message":{"type":"string"},"daysRemaining":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","monitorId","timestamp","subject","result","message","daysRemaining"],"additionalProperties":{},"description":"One recorded outcome in a website's history."},"AlertRule":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"enabled":{"type":"boolean"},"subject":{"anyOf":[{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},{"type":"null"}]},"triggerType":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"triggerValue":{"type":"number"},"triggers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days or weeks before expiry for `days`/`weeks`; ignored for event triggers."}},"required":["type","value"],"description":"One threshold or event a rule fires on."}},{"type":"null"}]},"domainIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"frequency":{"type":"string","enum":["once","daily","every_12h","every_6h","hourly"],"description":"How often a rule may re-deliver the same alert while the condition holds."},"channels":{"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]}},"integrationIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailListIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailRecipients":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"}},"required":["id","organizationId","name","enabled","subject","triggerType","triggerValue","triggers","domainIds","frequency","channels","integrationIds","emailListIds","emailRecipients","createdByEmail","createdAt"],"additionalProperties":{}},"AlertEvent":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"ruleId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"ruleName":{"type":"string"},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainName":{"type":"string"},"channels":{"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]}},"triggerKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"type":"number","description":"Unix ms."}},"required":["id","organizationId","ruleId","ruleName","domainId","domainName","channels","triggerKey","sentAt"],"additionalProperties":{},"description":"One delivered alert."},"EmailList":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"}},"required":["id","organizationId","name","emails","createdAt"],"additionalProperties":{}},"Integration":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"channel":{"type":"string","enum":["email","slack","discord","teams","webhook"]},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}},"required":["id","organizationId","channel","label","url","enabled","createdAt"],"additionalProperties":{}},"Member":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"status":{"type":"string","enum":["active","invited"]},"joinedAt":{"type":"number","description":"Unix ms the member joined, or the invitation was sent."}},"required":["id","organizationId","name","email","role","status","joinedAt"],"additionalProperties":{}},"Organization":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":{}},"Activity":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"type":{"type":"string"},"message":{"type":"string"},"actor":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","organizationId","type","message","actor","timestamp"],"additionalProperties":{}}}},"security":[{"apiKey":[]}],"tags":[{"name":"Domains","description":"Monitored websites and their check history."},{"name":"Alert rules","description":"What to alert on, how often, and where."},{"name":"Alert events","description":"Alerts that were delivered."},{"name":"Email lists","description":"Named sets of recipients for the email channel."},{"name":"Integrations","description":"Slack, Discord, Teams and webhook destinations."},{"name":"Team","description":"Members and invitations."},{"name":"Organization","description":"The workspace the key belongs to."},{"name":"Account","description":"Stats, activity, billing and the key itself."}],"paths":{"/v1/domains":{"get":{"operationId":"getV1Domains","tags":["Domains"],"summary":"List websites","description":"Every monitored website in the organization, most recently checked first.","responses":{"200":{"description":"The websites.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}},"post":{"operationId":"postV1Domains","tags":["Domains"],"summary":"Add a website","description":"Creates the website with its monitors (uptime, certificate, DNS, registration, plus a keyword check, a content check and a port check that stay disabled until `PUT /domains/{id}/keyword`, `/content` and `/port` give them something to look at) and probes it inline, so the response usually already carries a first result; anything too slow is finished by the scheduler within a minute. The uptime check requests the root over GET until `PUT /domains/{id}/http` gives it HTTP options. If the organization has no alert rules yet, one email rule per check is created so alerts reach the key's creator with no further setup.","responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domain":{"type":"string","example":"www.example.com"},"friendlyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"type":"string"},"certificateStatus":{"type":"string","enum":["checking","healthy","expiring_soon","expired","invalid","unreachable"]},"certificateIssuer":{"type":"string"},"certificateExpiresAt":{"type":"number","description":"Unix ms."},"certificateDaysRemaining":{"type":"number"},"certificateLastChecked":{"type":"number"},"certificateNextCheck":{"type":"number"},"certificateAutoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"certificate":{"type":"object","properties":{"issuer":{"type":"string"},"commonName":{"type":"string"},"subjectAlternativeNames":{"type":"array","items":{"type":"string"}},"serialNumber":{"type":"string"},"signatureAlgorithm":{"type":"string"},"publicKeyType":{"type":"string"},"publicKeySize":{"type":"number"},"validFrom":{"type":"number","description":"Unix ms."},"expirationDate":{"type":"number","description":"Unix ms."},"fingerprintSha256":{"type":"string"},"sslVersion":{"type":"string"},"chain":{"type":"array","items":{"type":"object","properties":{"commonName":{"type":"string"},"issuer":{"type":"string"},"type":{"type":"string","enum":["leaf","intermediate","root"]}},"required":["commonName","issuer","type"],"additionalProperties":{}}}},"required":["issuer","commonName","subjectAlternativeNames","serialNumber","signatureAlgorithm","publicKeyType","publicKeySize","validFrom","expirationDate","fingerprintSha256","sslVersion","chain"],"additionalProperties":{}},"certificateLastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"registrationStatus":{"anyOf":[{"type":"string","enum":["checking","healthy","expiring_soon","expired","at_risk","unsupported","lookup_failed"]},{"type":"null"}]},"registrar":{"type":"string"},"registrationExpiresAt":{"type":"number"},"registrationDaysRemaining":{"type":"number"},"registration":{"anyOf":[{"type":"object","properties":{"registrableDomain":{"type":"string"},"registrar":{"type":"string"},"registrarUrl":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number","description":"Unix ms. 0 when the registry publishes no expiry."},"updatedAt":{"type":"number"},"statuses":{"type":"array","items":{"type":"string"}},"nameservers":{"type":"array","items":{"type":"string"}},"source":{"type":"string"}},"required":["registrableDomain","registrar","createdAt","expiresAt","updatedAt","statuses","nameservers","source"],"additionalProperties":{}},{"type":"null"}]},"registrationLastChecked":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationNextCheck":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationLastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","domain","friendlyName","hostname","certificateStatus","certificateIssuer","certificateExpiresAt","certificateDaysRemaining","certificateLastChecked","certificateNextCheck","certificateAutoRenew","certificate","certificateLastError","registrationStatus","registrar","registrationExpiresAt","registrationDaysRemaining","registration","registrationLastChecked","registrationNextCheck","registrationLastError"],"additionalProperties":{},"description":"A monitored website with the latest state of its certificate and registration."}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"402":{"description":"The organization has no active subscription.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"409":{"description":"The request conflicts with the current state, for example the website limit.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"A hostname. A scheme, path or port is stripped, so a full URL is accepted.","example":"www.example.com","type":"string","minLength":1,"maxLength":253},"friendlyName":{"type":"string","maxLength":60,"description":"A label shown instead of the hostname.","example":"Marketing site"}},"required":["domain"]}}}}}},"/v1/domains/refresh":{"post":{"operationId":"postV1DomainsRefresh","tags":["Domains"],"summary":"Refresh every website","description":"Queues a fresh probe of every check on every website. Results land within a minute or two; poll the list.","responses":{"200":{"description":"How many websites were queued.","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"number"}},"required":["queued"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}}},"/v1/domains/{id}":{"get":{"operationId":"getV1DomainsById","tags":["Domains"],"summary":"Get a website","responses":{"200":{"description":"The website.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domain":{"type":"string","example":"www.example.com"},"friendlyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"type":"string"},"certificateStatus":{"type":"string","enum":["checking","healthy","expiring_soon","expired","invalid","unreachable"]},"certificateIssuer":{"type":"string"},"certificateExpiresAt":{"type":"number","description":"Unix ms."},"certificateDaysRemaining":{"type":"number"},"certificateLastChecked":{"type":"number"},"certificateNextCheck":{"type":"number"},"certificateAutoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"certificate":{"type":"object","properties":{"issuer":{"type":"string"},"commonName":{"type":"string"},"subjectAlternativeNames":{"type":"array","items":{"type":"string"}},"serialNumber":{"type":"string"},"signatureAlgorithm":{"type":"string"},"publicKeyType":{"type":"string"},"publicKeySize":{"type":"number"},"validFrom":{"type":"number","description":"Unix ms."},"expirationDate":{"type":"number","description":"Unix ms."},"fingerprintSha256":{"type":"string"},"sslVersion":{"type":"string"},"chain":{"type":"array","items":{"type":"object","properties":{"commonName":{"type":"string"},"issuer":{"type":"string"},"type":{"type":"string","enum":["leaf","intermediate","root"]}},"required":["commonName","issuer","type"],"additionalProperties":{}}}},"required":["issuer","commonName","subjectAlternativeNames","serialNumber","signatureAlgorithm","publicKeyType","publicKeySize","validFrom","expirationDate","fingerprintSha256","sslVersion","chain"],"additionalProperties":{}},"certificateLastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"registrationStatus":{"anyOf":[{"type":"string","enum":["checking","healthy","expiring_soon","expired","at_risk","unsupported","lookup_failed"]},{"type":"null"}]},"registrar":{"type":"string"},"registrationExpiresAt":{"type":"number"},"registrationDaysRemaining":{"type":"number"},"registration":{"anyOf":[{"type":"object","properties":{"registrableDomain":{"type":"string"},"registrar":{"type":"string"},"registrarUrl":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number","description":"Unix ms. 0 when the registry publishes no expiry."},"updatedAt":{"type":"number"},"statuses":{"type":"array","items":{"type":"string"}},"nameservers":{"type":"array","items":{"type":"string"}},"source":{"type":"string"}},"required":["registrableDomain","registrar","createdAt","expiresAt","updatedAt","statuses","nameservers","source"],"additionalProperties":{}},{"type":"null"}]},"registrationLastChecked":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationNextCheck":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationLastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","domain","friendlyName","hostname","certificateStatus","certificateIssuer","certificateExpiresAt","certificateDaysRemaining","certificateLastChecked","certificateNextCheck","certificateAutoRenew","certificate","certificateLastError","registrationStatus","registrar","registrationExpiresAt","registrationDaysRemaining","registration","registrationLastChecked","registrationNextCheck","registrationLastError"],"additionalProperties":{},"description":"A monitored website with the latest state of its certificate and registration."}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]},"patch":{"operationId":"patchV1DomainsById","tags":["Domains"],"summary":"Update a website","description":"Rename the hostname or its label. Changing the hostname resets both expiry clocks and queues fresh probes.","responses":{"200":{"description":"The updated website.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domain":{"type":"string","example":"www.example.com"},"friendlyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"type":"string"},"certificateStatus":{"type":"string","enum":["checking","healthy","expiring_soon","expired","invalid","unreachable"]},"certificateIssuer":{"type":"string"},"certificateExpiresAt":{"type":"number","description":"Unix ms."},"certificateDaysRemaining":{"type":"number"},"certificateLastChecked":{"type":"number"},"certificateNextCheck":{"type":"number"},"certificateAutoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"certificate":{"type":"object","properties":{"issuer":{"type":"string"},"commonName":{"type":"string"},"subjectAlternativeNames":{"type":"array","items":{"type":"string"}},"serialNumber":{"type":"string"},"signatureAlgorithm":{"type":"string"},"publicKeyType":{"type":"string"},"publicKeySize":{"type":"number"},"validFrom":{"type":"number","description":"Unix ms."},"expirationDate":{"type":"number","description":"Unix ms."},"fingerprintSha256":{"type":"string"},"sslVersion":{"type":"string"},"chain":{"type":"array","items":{"type":"object","properties":{"commonName":{"type":"string"},"issuer":{"type":"string"},"type":{"type":"string","enum":["leaf","intermediate","root"]}},"required":["commonName","issuer","type"],"additionalProperties":{}}}},"required":["issuer","commonName","subjectAlternativeNames","serialNumber","signatureAlgorithm","publicKeyType","publicKeySize","validFrom","expirationDate","fingerprintSha256","sslVersion","chain"],"additionalProperties":{}},"certificateLastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"registrationStatus":{"anyOf":[{"type":"string","enum":["checking","healthy","expiring_soon","expired","at_risk","unsupported","lookup_failed"]},{"type":"null"}]},"registrar":{"type":"string"},"registrationExpiresAt":{"type":"number"},"registrationDaysRemaining":{"type":"number"},"registration":{"anyOf":[{"type":"object","properties":{"registrableDomain":{"type":"string"},"registrar":{"type":"string"},"registrarUrl":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number","description":"Unix ms. 0 when the registry publishes no expiry."},"updatedAt":{"type":"number"},"statuses":{"type":"array","items":{"type":"string"}},"nameservers":{"type":"array","items":{"type":"string"}},"source":{"type":"string"}},"required":["registrableDomain","registrar","createdAt","expiresAt","updatedAt","statuses","nameservers","source"],"additionalProperties":{}},{"type":"null"}]},"registrationLastChecked":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationNextCheck":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationLastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","domain","friendlyName","hostname","certificateStatus","certificateIssuer","certificateExpiresAt","certificateDaysRemaining","certificateLastChecked","certificateNextCheck","certificateAutoRenew","certificate","certificateLastError","registrationStatus","registrar","registrationExpiresAt","registrationDaysRemaining","registration","registrationLastChecked","registrationNextCheck","registrationLastError"],"additionalProperties":{},"description":"A monitored website with the latest state of its certificate and registration."}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"409":{"description":"The request conflicts with the current state, for example the website limit.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"A hostname. A scheme, path or port is stripped, so a full URL is accepted.","example":"www.example.com","type":"string","minLength":1,"maxLength":253},"friendlyName":{"description":"A label shown instead of the hostname. Send an empty string or null to clear it.","anyOf":[{"type":"string","maxLength":60,"description":"A label shown instead of the hostname.","example":"Marketing site"},{"type":"null"}]}},"description":"Fields to change. Omitted fields are left as they are."}}}}},"delete":{"operationId":"deleteV1DomainsById","tags":["Domains"],"summary":"Remove a website","description":"Stops monitoring and deletes the website with its monitors and history.","responses":{"204":{"description":"Removed."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/refresh":{"post":{"operationId":"postV1DomainsByIdRefresh","tags":["Domains"],"summary":"Refresh a website","description":"Probes every check on the website now and returns the updated row. A check that takes longer than the request allows is finished by the scheduler within a minute.","responses":{"200":{"description":"The website after the probes.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domain":{"type":"string","example":"www.example.com"},"friendlyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"type":"string"},"certificateStatus":{"type":"string","enum":["checking","healthy","expiring_soon","expired","invalid","unreachable"]},"certificateIssuer":{"type":"string"},"certificateExpiresAt":{"type":"number","description":"Unix ms."},"certificateDaysRemaining":{"type":"number"},"certificateLastChecked":{"type":"number"},"certificateNextCheck":{"type":"number"},"certificateAutoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"certificate":{"type":"object","properties":{"issuer":{"type":"string"},"commonName":{"type":"string"},"subjectAlternativeNames":{"type":"array","items":{"type":"string"}},"serialNumber":{"type":"string"},"signatureAlgorithm":{"type":"string"},"publicKeyType":{"type":"string"},"publicKeySize":{"type":"number"},"validFrom":{"type":"number","description":"Unix ms."},"expirationDate":{"type":"number","description":"Unix ms."},"fingerprintSha256":{"type":"string"},"sslVersion":{"type":"string"},"chain":{"type":"array","items":{"type":"object","properties":{"commonName":{"type":"string"},"issuer":{"type":"string"},"type":{"type":"string","enum":["leaf","intermediate","root"]}},"required":["commonName","issuer","type"],"additionalProperties":{}}}},"required":["issuer","commonName","subjectAlternativeNames","serialNumber","signatureAlgorithm","publicKeyType","publicKeySize","validFrom","expirationDate","fingerprintSha256","sslVersion","chain"],"additionalProperties":{}},"certificateLastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"registrationStatus":{"anyOf":[{"type":"string","enum":["checking","healthy","expiring_soon","expired","at_risk","unsupported","lookup_failed"]},{"type":"null"}]},"registrar":{"type":"string"},"registrationExpiresAt":{"type":"number"},"registrationDaysRemaining":{"type":"number"},"registration":{"anyOf":[{"type":"object","properties":{"registrableDomain":{"type":"string"},"registrar":{"type":"string"},"registrarUrl":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number","description":"Unix ms. 0 when the registry publishes no expiry."},"updatedAt":{"type":"number"},"statuses":{"type":"array","items":{"type":"string"}},"nameservers":{"type":"array","items":{"type":"string"}},"source":{"type":"string"}},"required":["registrableDomain","registrar","createdAt","expiresAt","updatedAt","statuses","nameservers","source"],"additionalProperties":{}},{"type":"null"}]},"registrationLastChecked":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationNextCheck":{"anyOf":[{"type":"number"},{"type":"null"}]},"registrationLastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","domain","friendlyName","hostname","certificateStatus","certificateIssuer","certificateExpiresAt","certificateDaysRemaining","certificateLastChecked","certificateNextCheck","certificateAutoRenew","certificate","certificateLastError","registrationStatus","registrar","registrationExpiresAt","registrationDaysRemaining","registration","registrationLastChecked","registrationNextCheck","registrationLastError"],"additionalProperties":{},"description":"A monitored website with the latest state of its certificate and registration."}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/monitors":{"get":{"operationId":"getV1DomainsByIdMonitors","tags":["Domains"],"summary":"List a website's monitors","description":"The scheduled checks, with their cadence, next slot and latest outcome. Uptime, DNS, the keyword, content and port checks keep their detail here; the certificate and registration project onto the website itself. The keyword, content and port checks carry their `config` once set, and are `enabled: false` until then; the uptime check carries one once it has HTTP options.","responses":{"200":{"description":"The monitors.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/keyword":{"put":{"operationId":"putV1DomainsByIdKeyword","tags":["Domains"],"summary":"Set the keyword check","description":"Name the text a page on this website must contain (`present`) or must not contain (`absent`), and the check runs every 5 minutes against the raw HTML the server sends. Replaces any previous setting and probes immediately, so the response usually carries a first verdict. A failure is confirmed by a second probe before any rule fires. If the organization has no alert rule for keyword checks yet, an email rule is created so failures reach the key's creator.","responses":{"200":{"description":"The keyword monitor after the first probe.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"enabled":{"type":"boolean","description":"Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config."},"intervalMs":{"type":"number"},"nextCheck":{"type":"number","description":"Unix ms."},"lastChecked":{"type":"number"},"status":{"type":"string","enum":["checking","ok","warn","crit","unknown"]},"summary":{"type":"string"},"detail":{"anyOf":[{},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/KeywordConfig"},{"$ref":"#/components/schemas/ContentConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"$ref":"#/components/schemas/PortConfig"}]},{"type":"null"}],"description":"Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere."},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"failingSince":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","subject","enabled","intervalMs","nextCheck","lastChecked","status","summary","detail","config","lastError","consecutiveFailures","failingSince"],"additionalProperties":{},"description":"One scheduled check of one subject against one website."}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":200,"description":"The text to look for. Matched against the raw HTML the server sends, not a rendered page.","example":"Add to cart"},"mode":{"default":"present","type":"string","enum":["present","absent"],"description":"What the page is expected to do with the text. `present`: it must contain the text, so the check fails when the text disappears (a login button, a product name). `absent`: it must not contain the text, so the check fails when the text appears (\"Database error\", \"Out of stock\")."},"caseSensitive":{"default":false,"type":"boolean"},"path":{"description":"The page to request on the website's hostname. Defaults to `/`.","example":"/checkout","type":"string","maxLength":500},"enabled":{"default":true,"description":"Pause the check without forgetting its settings.","type":"boolean"}},"required":["keyword"],"description":"What the keyword check looks for, and where."}}}}},"delete":{"operationId":"deleteV1DomainsByIdKeyword","tags":["Domains"],"summary":"Remove the keyword check","description":"Forget the text and stop checking. The other checks on the website are unaffected.","responses":{"204":{"description":"Removed."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/content":{"put":{"operationId":"putV1DomainsByIdContent","tags":["Domains"],"summary":"Set the content check","description":"Watch a page on this website — or the part of it a CSS selector picks — for change. Every 5 minutes the page's visible text is compared with the previous probe's; `mode` decides whether any change counts, or only a change, drop or rise in the first number in the selection. A change alerts on the probe that sees it and becomes the new baseline; an unreadable page, an unmatched selector or a missing number is confirmed by a second probe before any rule fires. Replaces any previous setting and probes immediately, which records the baseline. If the organization has no alert rule for content checks yet, an email rule is created so changes reach the key's creator.","responses":{"200":{"description":"The content monitor after the first probe.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"enabled":{"type":"boolean","description":"Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config."},"intervalMs":{"type":"number"},"nextCheck":{"type":"number","description":"Unix ms."},"lastChecked":{"type":"number"},"status":{"type":"string","enum":["checking","ok","warn","crit","unknown"]},"summary":{"type":"string"},"detail":{"anyOf":[{},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/KeywordConfig"},{"$ref":"#/components/schemas/ContentConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"$ref":"#/components/schemas/PortConfig"}]},{"type":"null"}],"description":"Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere."},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"failingSince":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","subject","enabled","intervalMs","nextCheck","lastChecked","status","summary","detail","config","lastError","consecutiveFailures","failingSince"],"additionalProperties":{},"description":"One scheduled check of one subject against one website."}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"description":"The page to request on the website's hostname. Defaults to `/`.","example":"/checkout","type":"string","maxLength":500},"selector":{"default":"","type":"string","maxLength":200,"description":"CSS selector for the part of the page to watch: type, class, id and attribute selectors, `:nth-child`, `:not`, and the descendant and child combinators. Empty watches the whole page's text.","example":"#price"},"mode":{"default":"text","type":"string","enum":["text","number","decrease","increase"],"description":"What the content check compares between probes. `text`: the selected text, so any change alerts. `number`: the first number in the selection, so a change to it alerts. `decrease`: only when that number goes down (a price drop). `increase`: only when it goes up."},"enabled":{"default":true,"description":"Pause the check without forgetting its settings.","type":"boolean"}},"description":"Which page, which part of it, and what kind of change the content check watches for."}}}}},"delete":{"operationId":"deleteV1DomainsByIdContent","tags":["Domains"],"summary":"Remove the content check","description":"Forget the page and stop watching it. The other checks on the website are unaffected.","responses":{"204":{"description":"Removed."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/http":{"put":{"operationId":"putV1DomainsByIdHttp","tags":["Domains"],"summary":"Set the uptime check's HTTP options","description":"Turn the 5-minute uptime probe into an HTTP or API check: a path on the website, the method, request headers (a bearer token, an API key), the status codes that count as up, text the body must contain, and a response-time limit. Without options the probe requests the root over GET, with 2xx and 3xx up, 4xx a warning and 5xx down. A failing probe — the wrong status, missing text, or a response over the limit — is confirmed by a second probe before any rule fires; a response over the limit fires the `http_slow` trigger rather than `http_down`. Replaces any previous options and probes immediately.","responses":{"200":{"description":"The uptime monitor after the first probe.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"enabled":{"type":"boolean","description":"Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config."},"intervalMs":{"type":"number"},"nextCheck":{"type":"number","description":"Unix ms."},"lastChecked":{"type":"number"},"status":{"type":"string","enum":["checking","ok","warn","crit","unknown"]},"summary":{"type":"string"},"detail":{"anyOf":[{},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/KeywordConfig"},{"$ref":"#/components/schemas/ContentConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"$ref":"#/components/schemas/PortConfig"}]},{"type":"null"}],"description":"Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere."},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"failingSince":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","subject","enabled","intervalMs","nextCheck","lastChecked","status","summary","detail","config","lastError","consecutiveFailures","failingSince"],"additionalProperties":{},"description":"One scheduled check of one subject against one website."}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"description":"The page to request on the website's hostname. Defaults to `/`.","example":"/checkout","type":"string","maxLength":500},"method":{"default":"GET","type":"string","enum":["GET","HEAD","POST"],"description":"How the uptime probe requests the page. `HEAD` skips the body, so it cannot be combined with `bodyContains`."},"headers":{"default":{},"description":"Request headers sent on every probe, for an API that needs a token or a tenant. Stored as given and shown to members of the organization, so prefer a key scoped to health checks.","example":{"Authorization":"Bearer hc_...","Accept":"application/json"},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expectedStatuses":{"description":"Status codes that count as up. Empty keeps the default rule: 2xx and 3xx are up, 4xx warns, 5xx is down.","example":[200],"default":[],"maxItems":10,"type":"array","items":{"type":"integer","minimum":100,"maximum":599}},"bodyContains":{"default":"","description":"Text the response body must contain, checked against the first 2 MB. Empty leaves the body unread.","example":"\"status\":\"ok\"","type":"string","maxLength":200},"maxResponseMs":{"default":0,"description":"A response slower than this many milliseconds fails the probe, and a rule with the `http_slow` trigger hears about it. 0 sets no limit.","example":2000,"type":"integer","minimum":0,"maximum":10000}},"description":"How the uptime check requests the website and what counts as up."}}}}},"delete":{"operationId":"deleteV1DomainsByIdHttp","tags":["Domains"],"summary":"Reset the uptime check's HTTP options","description":"Back to a plain GET of the website's root with the default status rule, probed immediately. The check keeps running; only its options are forgotten.","responses":{"200":{"description":"The uptime monitor after the first probe.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"enabled":{"type":"boolean","description":"Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config."},"intervalMs":{"type":"number"},"nextCheck":{"type":"number","description":"Unix ms."},"lastChecked":{"type":"number"},"status":{"type":"string","enum":["checking","ok","warn","crit","unknown"]},"summary":{"type":"string"},"detail":{"anyOf":[{},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/KeywordConfig"},{"$ref":"#/components/schemas/ContentConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"$ref":"#/components/schemas/PortConfig"}]},{"type":"null"}],"description":"Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere."},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"failingSince":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","subject","enabled","intervalMs","nextCheck","lastChecked","status","summary","detail","config","lastError","consecutiveFailures","failingSince"],"additionalProperties":{},"description":"One scheduled check of one subject against one website."}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/port":{"put":{"operationId":"putV1DomainsByIdPort","tags":["Domains"],"summary":"Set the port check","description":"Name the TCP ports that must accept a connection — SSH, a database, a mail server, a game server — on the website's own hostname or on another host such as its origin, and every 5 minutes each one gets a connect and an immediate close from Cloudflare's network. Nothing is sent, so it proves a listener is there, not that the service behind it works. A closed or filtered port is confirmed by a second probe before any rule fires. A host that resolves to Cloudflare's edge is reported as unprobeable rather than closed, since the edge exposes no raw TCP ports; port 25 is refused because Cloudflare blocks outbound SMTP. Replaces any previous setting and probes immediately. If the organization has no alert rule for port checks yet, an email rule is created so failures reach the key's creator.","responses":{"200":{"description":"The port monitor after the first probe.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"domainId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"enabled":{"type":"boolean","description":"Whether the scheduler runs it. The keyword, content and port checks are disabled until they have a config."},"intervalMs":{"type":"number"},"nextCheck":{"type":"number","description":"Unix ms."},"lastChecked":{"type":"number"},"status":{"type":"string","enum":["checking","ok","warn","crit","unknown"]},"summary":{"type":"string"},"detail":{"anyOf":[{},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/KeywordConfig"},{"$ref":"#/components/schemas/ContentConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"$ref":"#/components/schemas/PortConfig"}]},{"type":"null"}],"description":"Set on the keyword, content and port checks once configured, and on the uptime check once it has HTTP options; null elsewhere."},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"failingSince":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","organizationId","domainId","subject","enabled","intervalMs","nextCheck","lastChecked","status","summary","detail","config","lastError","consecutiveFailures","failingSince"],"additionalProperties":{},"description":"One scheduled check of one subject against one website."}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"description":"Host to connect to. Empty means the website's own hostname. A website served through Cloudflare needs its origin's hostname or IP here, because the edge exposes no raw TCP ports to probe.","example":"db.example.com","default":"","type":"string","maxLength":253},"ports":{"description":"TCP ports that must accept a connection. Up to 10; each is its own connect on every probe.","example":[22,443,5432],"minItems":1,"maxItems":10,"type":"array","items":{"type":"integer","minimum":1,"maximum":65535}},"enabled":{"default":true,"description":"Pause the check without forgetting its settings.","type":"boolean"}},"required":["ports"],"description":"Which host and TCP ports the port check connects to."}}}}},"delete":{"operationId":"deleteV1DomainsByIdPort","tags":["Domains"],"summary":"Remove the port check","description":"Forget the ports and stop connecting. The other checks on the website are unaffected.","responses":{"204":{"description":"Removed."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/domains/{id}/history":{"get":{"operationId":"getV1DomainsByIdHistory","tags":["Domains"],"summary":"List a website's check history","description":"Recorded outcomes, newest first. Liveness checks write a row on every status change plus a heartbeat every six hours; the expiry clocks write on every probe. History is kept for 90 days.","responses":{"200":{"description":"The history page.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Check"}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"description":"Rows to return."},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"description":"Rows to skip."}]}},"/v1/alert-rules":{"get":{"operationId":"getV1AlertRules","tags":["Alert rules"],"summary":"List alert rules","responses":{"200":{"description":"The rules, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertRule"}}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}},"post":{"operationId":"postV1AlertRules","tags":["Alert rules"],"summary":"Create an alert rule","description":"A rule watches one subject. Expiry subjects (`certificate`, `registration`) take `days`/`weeks`/`on_expiration` triggers; `http` (the uptime check) takes `http_down`, `http_slow` and `recovered`; `dns` takes `dns_changed` and `recovered`; `keyword` takes `keyword_failed` and `recovered`; `content` takes `content_changed`, `content_failed` and `recovered`; `port` takes `port_down` and `recovered`. An enabled rule is evaluated immediately against every website it covers, so a website already inside a threshold alerts straight away.","responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"enabled":{"type":"boolean"},"subject":{"anyOf":[{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},{"type":"null"}]},"triggerType":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"triggerValue":{"type":"number"},"triggers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days or weeks before expiry for `days`/`weeks`; ignored for event triggers."}},"required":["type","value"],"description":"One threshold or event a rule fires on."}},{"type":"null"}]},"domainIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"frequency":{"type":"string","enum":["once","daily","every_12h","every_6h","hourly"],"description":"How often a rule may re-deliver the same alert while the condition holds."},"channels":{"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]}},"integrationIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailListIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailRecipients":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"}},"required":["id","organizationId","name","enabled","subject","triggerType","triggerValue","triggers","domainIds","frequency","channels","integrationIds","emailListIds","emailRecipients","createdByEmail","createdAt"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Certificate expiry"},"enabled":{"default":true,"type":"boolean"},"subject":{"default":"certificate","type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"triggers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days or weeks before expiry for `days`/`weeks`; ignored for event triggers."}},"required":["type","value"],"description":"One threshold or event a rule fires on."},"description":"Thresholds or events the rule fires on. Duplicates are collapsed and the list is sorted widest first.","example":[{"type":"days","value":14},{"type":"on_expiration","value":0}]},"frequency":{"default":"daily","type":"string","enum":["once","daily","every_12h","every_6h","hourly"],"description":"How often a rule may re-deliver the same alert while the condition holds."},"channels":{"minItems":1,"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]},"example":["email","slack"]},"integrationIds":{"description":"Integrations the webhook channels deliver to. A selected channel with no integration listed here delivers to every integration on that channel. Ids outside this organization are ignored.","anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailListIds":{"default":[],"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},"emailRecipients":{"default":[],"description":"Addresses the email channel delivers to, on top of any email lists. Falls back to the rule author when both are empty.","type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"domainIds":{"description":"Websites the rule is scoped to. Empty or null means every website in the organization.","anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]}},"required":["name","triggers","channels"]}}}}}},"/v1/alert-rules/{id}":{"get":{"operationId":"getV1AlertRulesById","tags":["Alert rules"],"summary":"Get an alert rule","responses":{"200":{"description":"The rule.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"enabled":{"type":"boolean"},"subject":{"anyOf":[{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},{"type":"null"}]},"triggerType":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"triggerValue":{"type":"number"},"triggers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days or weeks before expiry for `days`/`weeks`; ignored for event triggers."}},"required":["type","value"],"description":"One threshold or event a rule fires on."}},{"type":"null"}]},"domainIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"frequency":{"type":"string","enum":["once","daily","every_12h","every_6h","hourly"],"description":"How often a rule may re-deliver the same alert while the condition holds."},"channels":{"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]}},"integrationIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailListIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailRecipients":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"}},"required":["id","organizationId","name","enabled","subject","triggerType","triggerValue","triggers","domainIds","frequency","channels","integrationIds","emailListIds","emailRecipients","createdByEmail","createdAt"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]},"patch":{"operationId":"patchV1AlertRulesById","tags":["Alert rules"],"summary":"Update an alert rule","description":"Send only the fields to change. `{ \"enabled\": false }` pauses a rule without touching its scope.","responses":{"200":{"description":"The updated rule.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"enabled":{"type":"boolean"},"subject":{"anyOf":[{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},{"type":"null"}]},"triggerType":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"triggerValue":{"type":"number"},"triggers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days or weeks before expiry for `days`/`weeks`; ignored for event triggers."}},"required":["type","value"],"description":"One threshold or event a rule fires on."}},{"type":"null"}]},"domainIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"frequency":{"type":"string","enum":["once","daily","every_12h","every_6h","hourly"],"description":"How often a rule may re-deliver the same alert while the condition holds."},"channels":{"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]}},"integrationIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailListIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailRecipients":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"}},"required":["id","organizationId","name","enabled","subject","triggerType","triggerValue","triggers","domainIds","frequency","channels","integrationIds","emailListIds","emailRecipients","createdByEmail","createdAt"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Certificate expiry"},"enabled":{"type":"boolean"},"subject":{"type":"string","enum":["http","certificate","dns","registration","keyword","content","port"],"description":"Which check a monitor, rule or history row is about."},"triggers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["days","weeks","on_expiration","http_down","http_slow","port_down","dns_changed","keyword_failed","content_changed","content_failed","recovered"]},"value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Days or weeks before expiry for `days`/`weeks`; ignored for event triggers."}},"required":["type","value"],"description":"One threshold or event a rule fires on."},"description":"Thresholds or events the rule fires on. Duplicates are collapsed and the list is sorted widest first.","example":[{"type":"days","value":14},{"type":"on_expiration","value":0}]},"frequency":{"type":"string","enum":["once","daily","every_12h","every_6h","hourly"],"description":"How often a rule may re-deliver the same alert while the condition holds."},"channels":{"minItems":1,"type":"array","items":{"type":"string","enum":["email","slack","discord","teams","webhook"]},"example":["email","slack"]},"integrationIds":{"description":"Integrations the webhook channels deliver to. A selected channel with no integration listed here delivers to every integration on that channel. Ids outside this organization are ignored.","anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]},"emailListIds":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},"emailRecipients":{"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"domainIds":{"description":"Websites the rule is scoped to. Empty or null means every website in the organization.","anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."}},{"type":"null"}]}},"description":"Fields to change. Omitted fields are left as they are."}}}}},"delete":{"operationId":"deleteV1AlertRulesById","tags":["Alert rules"],"summary":"Delete an alert rule","responses":{"204":{"description":"Deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/alert-events":{"get":{"operationId":"getV1AlertEvents","tags":["Alert events"],"summary":"List delivered alerts","description":"Every alert that was delivered, newest first, with the rule, website and channels it went to.","responses":{"200":{"description":"The events page.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertEvent"}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"description":"Rows to return."},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"description":"Rows to skip."}]}},"/v1/email-lists":{"get":{"operationId":"getV1EmailLists","tags":["Email lists"],"summary":"List email lists","responses":{"200":{"description":"The lists, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailList"}}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}},"post":{"operationId":"postV1EmailLists","tags":["Email lists"],"summary":"Create an email list","description":"A named set of addresses an alert rule's email channel can deliver to.","responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"}},"required":["id","organizationId","name","emails","createdAt"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"On-call"},"emails":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"example":["ops@example.com"]}},"required":["name","emails"]}}}}}},"/v1/email-lists/{id}":{"get":{"operationId":"getV1EmailListsById","tags":["Email lists"],"summary":"Get an email list","responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"}},"required":["id","organizationId","name","emails","createdAt"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]},"patch":{"operationId":"patchV1EmailListsById","tags":["Email lists"],"summary":"Update an email list","description":"`emails` replaces the whole set when sent.","responses":{"200":{"description":"The updated list.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"}},"required":["id","organizationId","name","emails","createdAt"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"emails":{"minItems":1,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"description":"Fields to change. Omitted fields are left as they are."}}}}},"delete":{"operationId":"deleteV1EmailListsById","tags":["Email lists"],"summary":"Delete an email list","description":"Rules that referenced the list keep their other recipients.","responses":{"204":{"description":"Deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/integrations":{"get":{"operationId":"getV1Integrations","tags":["Integrations"],"summary":"List integrations","responses":{"200":{"description":"The integrations, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}},"post":{"operationId":"postV1Integrations","tags":["Integrations"],"summary":"Create an integration","description":"A webhook destination for one channel. Slack, Discord and Teams each get the payload shape their incoming webhooks expect; `webhook` receives a JSON event (`ssl.alert`, `domain.alert`, `http.alert`, `dns.alert`, `keyword.alert`, `content.alert`, `port.alert`, or the same with `.test`). Prove the URL with the test endpoint before relying on it.","responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"channel":{"type":"string","enum":["email","slack","discord","teams","webhook"]},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}},"required":["id","organizationId","channel","label","url","enabled","createdAt"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["slack","discord","teams","webhook"],"description":"Where an integration delivers. Email needs no integration; rules address recipients directly."},"label":{"type":"string","minLength":1,"maxLength":120,"example":"#ops"},"url":{"type":"string","format":"uri","description":"The incoming-webhook URL the channel gave you.","example":"https://hooks.slack.com/services/..."},"enabled":{"default":true,"type":"boolean"}},"required":["channel","label","url"]}}}}}},"/v1/integrations/{id}":{"get":{"operationId":"getV1IntegrationsById","tags":["Integrations"],"summary":"Get an integration","responses":{"200":{"description":"The integration.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"channel":{"type":"string","enum":["email","slack","discord","teams","webhook"]},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}},"required":["id","organizationId","channel","label","url","enabled","createdAt"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]},"patch":{"operationId":"patchV1IntegrationsById","tags":["Integrations"],"summary":"Update an integration","description":"Send only the fields to change. `{ \"enabled\": false }` mutes a destination without deleting it.","responses":{"200":{"description":"The updated integration.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"organizationId":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"channel":{"type":"string","enum":["email","slack","discord","teams","webhook"]},"label":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}},"required":["id","organizationId","channel","label","url","enabled","createdAt"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["slack","discord","teams","webhook"],"description":"Where an integration delivers. Email needs no integration; rules address recipients directly."},"label":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri","description":"The incoming-webhook URL the channel gave you.","example":"https://hooks.slack.com/services/..."},"enabled":{"type":"boolean"}},"description":"Fields to change. Omitted fields are left as they are."}}}}},"delete":{"operationId":"deleteV1IntegrationsById","tags":["Integrations"],"summary":"Delete an integration","responses":{"204":{"description":"Deleted."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/integrations/{id}/test":{"post":{"operationId":"postV1IntegrationsByIdTest","tags":["Integrations"],"summary":"Send a test alert","description":"Posts a clearly-labelled sample alert to the integration, in the exact shape a real one takes. Works on a disabled integration, so a URL can be proven before it is switched on. A delivery failure returns 502 with what the receiver said.","responses":{"200":{"description":"Delivered.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"502":{"description":"A downstream delivery failed; `error` carries what the receiver said.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/team/members":{"get":{"operationId":"getV1TeamMembers","tags":["Team"],"summary":"List members and invitations","description":"Active members and pending invitations in one list; `status` tells them apart.","responses":{"200":{"description":"The team.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}}},"/v1/team/invitations":{"post":{"operationId":"postV1TeamInvitations","tags":["Team"],"summary":"Invite a member","description":"Records a pending invitation and returns the link that accepts it. Upcheck does not email it; send the link yourself. Invitations expire after seven days.","responses":{"201":{"description":"The invitation and its accept link.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"acceptUrl":{"type":"string","description":"Send this to the invitee; opening it joins the organization."}},"required":["id","acceptUrl"]}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","example":"colleague@example.com"},"role":{"default":"member","type":"string","enum":["admin","member"]}},"required":["email"]}}}}}},"/v1/team/members/{id}":{"patch":{"operationId":"patchV1TeamMembersById","tags":["Team"],"summary":"Change a member's role","responses":{"200":{"description":"The member with the new role.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"}},"required":["id","role"]}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]}},"required":["role"]}}}}},"delete":{"operationId":"deleteV1TeamMembersById","tags":["Team"],"summary":"Remove a member or withdraw an invitation","responses":{"204":{"description":"Removed."},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"404":{"description":"No such resource in this organization.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"example":"9b1d..."},"required":true,"description":"Opaque identifier."}]}},"/v1/organization":{"get":{"operationId":"getV1Organization","tags":["Organization"],"summary":"Get the organization","responses":{"200":{"description":"The organization the key belongs to.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":{}}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}},"patch":{"operationId":"patchV1Organization","tags":["Organization"],"summary":"Rename the organization","responses":{"200":{"description":"The renamed organization.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque identifier.","example":"9b1d..."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":{}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"403":{"description":"The key's role does not allow this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Acme Ops"}},"required":["name"]}}}}}},"/v1/me":{"get":{"operationId":"getV1Me","tags":["Account"],"summary":"Identify the key","description":"Which organization the key belongs to and what it may do. A cheap way to check a key works.","responses":{"200":{"description":"The key and its organization.","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"},"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["admin","member"],"description":"What the key may do. `admin` can change monitoring and alerting; `member` is read-only."}},"required":["id","name","role"]}},"required":["organization","key"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}}},"/v1/stats":{"get":{"operationId":"getV1Stats","tags":["Account"],"summary":"Get dashboard stats","description":"The counts the dashboard overview shows: websites per certificate and registration state, websites currently failing, and alerts sent in the last seven days.","responses":{"200":{"description":"The stats.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"healthy":{"type":"number"},"expiringSoon":{"type":"number"},"expired":{"type":"number"},"invalid":{"type":"number"},"unreachable":{"type":"number"},"registrationExpiringSoon":{"type":"number"},"registrationExpired":{"type":"number"},"registrationAtRisk":{"type":"number"},"recentFailures":{"type":"number","description":"Websites where either clock is in a failing state."},"alertsSent7d":{"type":"number"}},"required":["total","healthy","expiringSoon","expired","invalid","unreachable","registrationExpiringSoon","registrationExpired","registrationAtRisk","recentFailures","alertsSent7d"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}}},"/v1/activity":{"get":{"operationId":"getV1Activity","tags":["Account"],"summary":"List recent activity","description":"The organization's audit trail, newest first: websites added and removed, rules changed, alerts sent, renewals and failures noticed.","responses":{"200":{"description":"Recent activity.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}}}}},"400":{"description":"The request body or parameters are invalid. `error` names the first problem.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}},"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/billing":{"get":{"operationId":"getV1Billing","tags":["Account"],"summary":"Get the billing summary","description":"Subscription state and the current monthly estimate. Checkout and the customer portal are dashboard-only.","responses":{"200":{"description":"The summary.","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"hasCustomer":{"type":"boolean"},"websiteCount":{"type":"number"},"maxDomains":{"type":"number"},"basePrice":{"type":"number"},"perDomain":{"type":"number"},"estimatedTotal":{"type":"number"}},"required":["active","status","currentPeriodEnd","cancelAtPeriodEnd","hasCustomer","websiteCount","maxDomains","basePrice","perDomain","estimatedTotal"]}}}},"401":{"description":"The API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}},"429":{"description":"The key's rate limit was exceeded. Honour `Retry-After`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable explanation."},"code":{"type":"string","description":"Stable machine-readable code.","example":"not_found"}},"required":["error","code"]}}}}}}}}}