{"openapi":"3.1.0","info":{"title":"Sites in the Woods API","version":"1","description":"Monitoring data for a team's sites: status, uptime, incidents, insights and domains; and, for Member and Admin keys on teams with 10 sites or more, the writes a team makes (dismiss, check again, maintenance windows, pause). Readable docs: /api/docs; for developers and agents: /developers. The API is unversioned and changes only by adding routes and fields; one that has to go is announced at least 90 days ahead, on its responses, with Deprecation (RFC 9745) and Sunset (RFC 8594) headers and a Link to /developers#versioning (rel=\"deprecation\"). Errors are RFC 9457 problem details. Limits come as RateLimit-Policy and RateLimit (IETF draft 11)."},"servers":[{"url":"https://sitesinthewoods.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A key from the dashboard's API keys page (sm_…). Each operation lists the lowest key role that may call it: viewer keys read; dismiss, check again, maintenance windows, pause need a member or admin key, on teams with 10 sites or more."}},"schemas":{"Error":{"type":"object","properties":{"type":{"type":"string","description":"RFC 9457: this error's row in the docs (/api/docs#error-<code>)"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"detail":{"type":"string","description":"what went wrong, for a person (the same as message)"},"error":{"type":"string","enum":["unauthorized","forbidden","not_found","method_not_allowed","conflict","validation_error","request_too_large","rate_limited","auth_unavailable"]},"message":{"type":"string"},"suggestion":{"type":"string"},"next_steps":{"description":"calls that fix this or come next","type":"array","items":{"type":"object","properties":{"method":{"type":"string","const":"GET"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"description":"the MCP tool that makes this call","type":"string"}},"required":["method","path","why"],"additionalProperties":false}},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","error","message"],"additionalProperties":false}}},"paths":{"/api/status":{"get":{"operationId":"status","summary":"Every one of the team's sites: its status right now, and the open incidents","description":"Call this first, or on a schedule (at most once a minute, as often as the checks run), to see whether anything is down or warning right now.","security":[{"bearer":["viewer"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sites":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"paused":{"type":"boolean"}},"required":["slug","name","status","paused"],"additionalProperties":false}},"openIncidents":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"severity":{"type":"string","enum":["down","warning"]},"site":{"type":["string","null"]},"startedAt":{"type":"string","description":"ISO 8601, UTC (…Z)"},"cause":{"type":["string","null"]},"dismissed":{"type":"boolean"}},"required":["kind","severity","site","startedAt","cause","dismissed"],"additionalProperties":false}}},"required":["sites","openIncidents"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites":{"get":{"operationId":"sites","summary":"The team's sites: status, homepage uptime over 1, 7 and 30 days, open incidents","description":"Call this to compare sites or report on uptime over the last day, week or month. It also lists the slugs every other route takes.","security":[{"bearer":["viewer"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"project":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"},"paused":{"type":"boolean"},"public":{"type":"boolean"},"checkFrom":{"type":"string","enum":["us-west","us-east","split"],"description":"where the homepage, nav and newest-content checks run; a failure is checked again from the other location before it alerts or counts against uptime"},"uptime":{"anyOf":[{"type":"object","properties":{"d1":{"type":"object","properties":{"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent":{"description":"ok / total × 100, two decimals; null with no checks","type":["number","null"]}},"required":["ok","total","percent"],"additionalProperties":false},"d7":{"type":"object","properties":{"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent":{"description":"ok / total × 100, two decimals; null with no checks","type":["number","null"]}},"required":["ok","total","percent"],"additionalProperties":false},"d30":{"type":"object","properties":{"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent":{"description":"ok / total × 100, two decimals; null with no checks","type":["number","null"]}},"required":["ok","total","percent"],"additionalProperties":false}},"required":["d1","d7","d30"],"additionalProperties":false,"description":"the homepage's checks over the last 1, 7 and 30 days"},{"type":"null"}]},"openIncidents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dismissed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"of those, how many the team dismissed"}},"required":["slug","name","project","url","status","paused","public","checkFrom","uptime","openIncidents","dismissed"],"additionalProperties":false}},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}":{"get":{"operationId":"sites_by_slug","summary":"One site: its last 7 days (as in the weekly brief), open incidents, domain and TLS expiry","description":"Call this to answer questions about one site: how it did this week, what's wrong with it now, and when its domain or certificate runs out.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"project":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"},"paused":{"type":"boolean"},"public":{"type":"boolean"},"checkFrom":{"type":"string","enum":["us-west","us-east","split"],"description":"where the homepage, nav and newest-content checks run; a failure is checked again from the other location before it alerts or counts against uptime"},"week":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, UTC (…Z)"},"to":{"type":"string","description":"ISO 8601, UTC (…Z)"},"uptime":{"type":"object","properties":{"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent":{"description":"ok / total × 100, two decimals; null with no checks","type":["number","null"]}},"required":["ok","total","percent"],"additionalProperties":false},"typicalMs":{"description":"median homepage response time (time to first byte); for a site checked from both locations, of their average, each location counted once","type":["number","null"]},"outages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"longestOutageMs":{"type":["number","null"]},"warnings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dismissed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"readers":{"anyOf":[{"type":"object","properties":{"periodEnd":{"type":"string"},"lcpP75":{"type":["number","null"]},"inpP75":{"type":["number","null"]},"clsP75":{"type":["number","null"]},"ttfbP75":{"type":["number","null"]}},"required":["periodEnd","lcpP75","inpP75","clsP75","ttfbP75"],"additionalProperties":false},{"type":"null"}],"description":"real readers on phones (Chrome UX Report, 28 days); null when Chrome has too little data. Times in ms"},"htmlBytes":{"type":"object","properties":{"now":{"type":["number","null"]},"weekAgo":{"type":["number","null"]}},"required":["now","weekAgo"],"additionalProperties":false},"brokenLinkPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageErrors":{"type":"boolean","description":"new errors from the site's own code right now"},"traffic":{"anyOf":[{"type":"object","properties":{"visits":{"type":"number"},"weekBefore":{"type":["number","null"]},"pages":{"type":"number"},"cacheHits":{"type":"number"}},"required":["visits","weekBefore","pages","cacheHits"],"additionalProperties":false},{"type":"null"}]}},"required":["from","to","uptime","typicalMs","outages","longestOutageMs","warnings","dismissed","readers","htmlBytes","brokenLinkPages","pageErrors","traffic"],"additionalProperties":false},{"type":"null"}],"description":"the last 7 days, as in the weekly brief; null for paused sites"},"openIncidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"severity":{"type":"string","enum":["down","warning"]},"site":{"description":"site slug","type":["string","null"]},"url":{"description":"the page or file it's about","type":["string","null"]},"domain":{"type":["string","null"]},"startedAt":{"type":"string","description":"ISO 8601, UTC (…Z)"},"resolvedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"cause":{"type":["string","null"]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dismissed":{"anyOf":[{"type":"object","properties":{"by":{"type":"string"},"at":{"type":"string","description":"ISO 8601, UTC (…Z)"}},"required":["by","at"],"additionalProperties":false},{"type":"null"}],"description":"the team marked it as noise: still open, never alerts again"},"likelyCause":{"description":"open outages and slowdowns only: the monitor's rules, as in the alert","anyOf":[{"type":"object","properties":{"likely":{"type":["string","null"]},"clues":{"type":"array","items":{"type":"string"}}},"required":["likely","clues"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","label","severity","site","url","domain","startedAt","resolvedAt","cause","details","dismissed"],"additionalProperties":false}},"domain":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"daysLeft":{"type":["number","null"]},"registrar":{"type":["string","null"]}},"required":["name","expiresAt","daysLeft","registrar"],"additionalProperties":false},{"type":"null"}]},"tls":{"type":"object","properties":{"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"daysLeft":{"type":["number","null"]},"issuer":{"type":["string","null"]}},"required":["expiresAt","daysLeft","issuer"],"additionalProperties":false}},"required":["slug","name","project","url","status","paused","public","checkFrom","week","openIncidents","domain","tls"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/insights":{"get":{"operationId":"sites_by_slug_insights","summary":"One site's daily insights: page weight, security headers, prefetches, page errors, broken links, cache, dead ends","description":"Call this when a site is slow or heavy, or to find what to fix: the daily browser load's page weight, missing security headers, JavaScript errors and broken links.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"readers":{"anyOf":[{"type":"object","properties":{"periodEnd":{"type":"string"},"lcpP75":{"type":["number","null"]},"inpP75":{"type":["number","null"]},"clsP75":{"type":["number","null"]},"ttfbP75":{"type":["number","null"]}},"required":["periodEnd","lcpP75","inpP75","clsP75","ttfbP75"],"additionalProperties":false},{"type":"null"}],"description":"real readers on phones (Chrome UX Report, 28 days); null when Chrome has too little data. Times in ms"},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"latest":{"anyOf":[{"type":"object","properties":{"day":{"type":"string"},"measuredAt":{"type":"string","description":"ISO 8601, UTC (…Z)"},"ok":{"type":"boolean"},"error":{"type":["string","null"]},"htmlBytes":{"type":["number","null"]},"wireBytes":{"type":["number","null"]},"scripts":{"type":["number","null"]},"jsBytes":{"type":["number","null"]},"cssBytes":{"type":["number","null"]},"images":{"type":["number","null"]},"frameworkBytes":{"type":["number","null"]},"headers":{"type":"object","properties":{"grade":{"type":["string","null"]},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"weight":{"type":"number"},"detail":{"type":"string"}},"required":["id","ok","weight","detail"],"additionalProperties":false}}},"required":["grade","findings"],"additionalProperties":false},"prefetches":{"type":"object","properties":{"requests":{"type":["number","null"]},"prefetches":{"type":["number","null"]},"pages":{"type":["number","null"]},"uncached":{"type":["number","null"]}},"required":["requests","prefetches","pages","uncached"],"additionalProperties":false},"pageErrors":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["exception","console","asset"]},"message":{"type":"string"},"source":{"type":["string","null"]},"own":{"type":"boolean"},"count":{"type":"number"}},"required":["kind","message","source","own","count"],"additionalProperties":false}},{"type":"null"}],"description":"null when the browser view didn't run"},"badgeLinks":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"href":{"type":"string"},"rel":{"type":"string","description":"its rel tokens, \"\" when none"}},"required":["href","rel"],"additionalProperties":false}},{"type":"null"}],"description":"links on the page to our public status pages (an embedded badge, or a plain link); null when not looked for"}},"required":["day","measuredAt","ok","error","htmlBytes","wireBytes","scripts","jsBytes","cssBytes","images","frameworkBytes","headers","prefetches","pageErrors","badgeLinks"],"additionalProperties":false},{"type":"null"}]}},"required":["url","latest"],"additionalProperties":false},"description":"the homepage and the newest page, measured daily"},"cache":{"anyOf":[{"type":"object","properties":{"pages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"least":{"anyOf":[{"type":"object","properties":{"path":{"type":"string"},"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["path","ok","hits"],"additionalProperties":false},{"type":"null"}]}},"required":["pages","ok","hits","least"],"additionalProperties":false},{"type":"null"}],"description":"Cloudflare cache over the last 24 hours, across the site's monitored pages"},"brokenLinks":{"type":"array","items":{"type":"object","properties":{"page":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"status":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["url","status","error"],"additionalProperties":false}}},"required":["page","links"],"additionalProperties":false}},"pageChecks":{"anyOf":[{"type":"object","properties":{"day":{"type":"string"},"pagesSeen":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesChecked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notFound":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["not_found","soft_404","login","redirect_off_host","blocked","error"]},"status":{"type":["number","null"]},"wayOn":{"type":"boolean","description":"a 404 or 410 that links anywhere on the site, or has a search form"},"unconfirmed":{"type":"boolean","description":"a bad answer a second made-up path didn't repeat"}},"required":["state","status","wayOn","unconfirmed"],"additionalProperties":false},{"type":"null"}],"description":"the answer to one made-up path; null when it didn't run"},"navOnly":{"type":"array","items":{"type":"string"},"description":"pages whose only links are the navigation"},"noWayBack":{"type":"array","items":{"type":"object","properties":{"page":{"type":"string"},"parent":{"type":"string"}},"required":["page","parent"],"additionalProperties":false},"description":"pages with no link to their section"},"unclearLabels":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"links whose label says nothing alone (links hidden from assistive technology aren't counted); null when the pages' language isn't covered"}},"required":["day","pagesSeen","pagesChecked","notFound","navOnly","noWayBack","unclearLabels"],"additionalProperties":false},{"type":"null"}],"description":"where people find no way forward: the pages the daily run reads, and one made-up path (latest day of the last 3)"},"apiChecks":{"type":"array","items":{"type":"object","properties":{"spec":{"type":"string","description":"the OpenAPI file's URL"},"day":{"type":"string"},"notChecked":{"description":"why nothing was probed (YAML, another host…)","type":["string","null"]},"probes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["not_found","unauthorized","list"]},"url":{"type":"string"},"state":{"type":"string","enum":["answered","blocked","redirect","error"]},"status":{"type":["number","null"]},"recovers":{"description":"errors: the body says how to recover","type":["boolean","null"]},"paging":{"description":"lists: a next link and a way to stop","type":["boolean","null"]}},"required":["kind","url","state","status","recovers","paging"],"additionalProperties":false}}},"required":["spec","day","notChecked","probes"],"additionalProperties":false},"description":"where agents find no way forward: up to three keyless GETs a day to the site's own API (latest day of the last 3)"}},"required":["readers","pages","cache","brokenLinks","pageChecks","apiChecks"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/scans":{"get":{"operationId":"sites_by_slug_scans","summary":"One site's API recovery scans, newest first: state, how each ended, and findings by weight","description":"Call this to see whether a site has been scanned for dead ends (API errors that don't say how to recover, lists without paging, pages nothing links to) and how the last scan came out. Scans are started from the dashboard by an admin or owner.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}},{"name":"limit","in":"query","required":false,"description":"page size, clamped to 1–100","schema":{"description":"page size, clamped to 1–100","default":20,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"offset","in":"query","required":false,"description":"rows to skip, at most 1000","schema":{"description":"rows to skip, at most 1000","default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["quoting","quoted","queued","running","paused","done","stopped","failed"]},"ending":{"description":"how it ended: complete, team_stopped, we_stopped, ownership_lost, plan_changed, site_removed, blocked, budget, error","type":["string","null"]},"startedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"kind":{"type":"string","enum":["scan","rescan","rerun"]},"findings":{"anyOf":[{"type":"object","properties":{"high":{"type":"number"},"medium":{"type":"number"},"light":{"type":"number"},"warning":{"type":"number"}},"required":["high","medium","light","warning"],"additionalProperties":false},{"type":"null"}]}},"required":["id","state","ending","startedAt","finishedAt","kind","findings"],"additionalProperties":false}},"limit":{"type":"integer","description":"page size used (1–100)"},"offset":{"type":"integer","description":"rows skipped"},"has_more":{"type":"boolean","description":"another page follows"},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data","limit","offset","has_more"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/scans/{id}":{"get":{"operationId":"sites_by_slug_scans_by_id","summary":"One API recovery scan: what it saw, its findings, the fixes and what changed since the last scan","description":"Call this for a scan's results: findings by weight with the places on the site, three to five fixes in words and as a block for a coding agent, and new, fixed and still-open findings since the previous scan. It never includes text from the scanned site.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}},{"name":"id","in":"path","required":true,"description":"scan id, as in /api/sites/{slug}/scans","schema":{"type":"string","description":"scan id, as in /api/sites/{slug}/scans"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["quoting","quoted","queued","running","paused","done","stopped","failed"]},"ending":{"description":"how it ended: complete, team_stopped, we_stopped, ownership_lost, plan_changed, site_removed, blocked, budget, error","type":["string","null"]},"startedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"kind":{"type":"string","enum":["scan","rescan","rerun"]},"findings":{"anyOf":[{"type":"object","properties":{"high":{"type":"number"},"medium":{"type":"number"},"light":{"type":"number"},"warning":{"type":"number"}},"required":["high","medium","light","warning"],"additionalProperties":false},{"type":"null"}]},"seen":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}],"description":"paths probed, pages read, requests…"},"items":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"weight":{"type":"string","enum":["high","medium","light","warning"]},"count":{"type":"number"},"places":{"type":"array","items":{"type":"string"},"description":"up to 50 paths on the site"}},"required":["check","weight","count","places"],"additionalProperties":false}},"fixes":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"},"places":{"type":"array","items":{"type":"string"}},"more":{"type":"number"}},"required":["title","text","places","more"],"additionalProperties":false}},"agentBlock":{"description":"the fixes for a coding agent, written by our code: no text from the site","type":["string","null"]},"compare":{"anyOf":[{"type":"object","properties":{"previous":{"type":"string"},"fixed":{"type":"number"},"added":{"type":"number"},"open":{"type":"number"},"notChecked":{"type":"number"}},"required":["previous","fixed","added","open","notChecked"],"additionalProperties":false},{"type":"null"}]}},"required":["id","state","ending","startedAt","finishedAt","kind","findings","seen","items","fixes","agentBlock","compare"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/maintenance":{"get":{"operationId":"sites_by_slug_maintenance","summary":"One site's maintenance windows: on now, scheduled, and the last 30 days","description":"Call this to see whether a site is in a maintenance window (its alerts held, its uptime not counting that time) and when the next one is. Windows are started from the dashboard or a deploy calling the site's maintenance URL (POST <url>/start?minutes=30, POST <url>/end), which the dashboard shows to admins.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"windows":{"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string"},"endsAt":{"type":"string","description":"at most 24 hours after startsAt; an early end shows here"},"state":{"type":"string","enum":["scheduled","on","ended"]},"scope":{"type":"string","enum":["site","project"],"description":"this site only, or every site in its project"},"reason":{"description":"the team's own words; never on the public page","type":["string","null"]},"createdBy":{"type":"string","description":"a person, or \"maintenance URL\""},"endedBy":{"description":"who ended it early; null when it ran its course","type":["string","null"]}},"required":["startsAt","endsAt","state","scope","reason","createdBy","endedBy"],"additionalProperties":false},"description":"newest start first"}},"required":["windows"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/map":{"get":{"operationId":"sites_by_slug_map","summary":"One site's structure from its sitemaps: sections, new and removed pages, what fails","description":"Call this to see where a site is changing or breaking without crawling it: every path with pages under it, with new and removed pages in the window, pages that fail, broken links and sitemaps that miss pages. Add ?section= for one section's pages. Our sites only (competitors' sitemaps aren't read).","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}},{"name":"range","in":"query","required":false,"description":"the window for new and removed pages","schema":{"default":"7d","description":"the window for new and removed pages","type":"string","enum":["24h","7d","30d"]}},{"name":"section","in":"query","required":false,"description":"a section path such as \"/c\" to list its pages","schema":{"description":"a section path such as \"/c\" to list its pages","type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"range":{"type":"string"},"sitemaps":{"type":"array","items":{"type":"string"}},"firstFetchAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}],"description":"pages listed then count as there from the start, never as new"},"pages":{"type":"number"},"newInWindow":{"type":"number"},"removedInWindow":{"type":"number"},"checked":{"type":"number","description":"pages the monitor checks itself; the rest are known from the sitemap"},"linkChecked":{"description":"listed URLs link-checked in the last 7 days, when every sitemap URL is checked","type":["number","null"]},"history":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","description":"YYYY-MM-DD, a UTC day"},"pages":{"type":"number","description":"pages listed at the day's end"},"new":{"type":"number"},"removed":{"type":"number"}},"required":["day","pages","new","removed"],"additionalProperties":false},"description":"the whole site's days in the window (at least two), oldest first; kept 400 days, since monitoring began"},"sections":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"\"/c/alaska-news\" (no trailing slash)"},"depth":{"type":"number","description":"1 for a top-level section"},"pages":{"type":"number","description":"live pages at or under this path"},"newInWindow":{"type":"number","description":"first seen in the window (not in the sitemap's first fetch)"},"removedInWindow":{"type":"number","description":"dropped from every sitemap in the window (removed pages are kept 30 days)"},"newest":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}],"description":"newest page's content date, else first seen"},"tone":{"type":"string","enum":["up","warn","down"],"description":"up: no known problem; warn: warnings or more than 20% removed; down: a page fails"},"failing":{"type":"number","description":"listed URLs that fail"},"brokenLinkPages":{"type":"number","description":"pages with an open broken-links incident"},"checked":{"type":"number","description":"pages the monitor checks itself"},"missingFrom":{"type":"array","items":{"type":"object","properties":{"sitemap":{"type":"string"},"count":{"type":"number"}},"required":["sitemap","count"],"additionalProperties":false},"description":"sitemaps that list at least half the pages here but miss some, and how many they miss"},"history":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","description":"YYYY-MM-DD, a UTC day"},"pages":{"type":"number","description":"pages listed at the day's end"},"new":{"type":"number"},"removed":{"type":"number"}},"required":["day","pages","new","removed"],"additionalProperties":false}},{"type":"null"}],"description":"a top-level section's days in the window, oldest first; null below the top level"}},"required":["path","depth","pages","newInWindow","removedInWindow","newest","tone","failing","brokenLinkPages","checked","missingFrom","history"],"additionalProperties":false},"description":"every path with pages under it, largest first within each level; a lone page such as /about is a page, not a section"},"pagesShown":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"path":{"type":"string"},"title":{"type":["string","null"]},"date":{"type":"string","description":"content date (published, created, last modified), else first seen"},"isNew":{"type":"boolean"},"checked":{"type":"boolean"},"tone":{"type":"string","enum":["up","warn","down"]},"fails":{"type":"boolean"},"hasBrokenLinks":{"type":"boolean"},"missingFrom":{"type":"array","items":{"type":"string"}}},"required":["url","path","title","date","isNew","checked","tone","fails","hasBrokenLinks","missingFrom"],"additionalProperties":false}},{"type":"null"}],"description":"with ?section=: that section's pages, newest first, at most 1000"}},"required":["range","sitemaps","firstFetchAt","pages","newInWindow","removedInWindow","checked","linkChecked","history","sections","pagesShown"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/events":{"get":{"operationId":"sites_by_slug_events","summary":"What changed on one site: incidents opened and resolved, code pushes, maintenance, new pages","description":"Call this to find what changed before a number moved (clicks fell, pages got slower): the site's timeline, newest first, the same events the dashboard draws on its charts. Page through with limit and offset.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}},{"name":"range","in":"query","required":false,"description":"the window","schema":{"default":"7d","description":"the window","type":"string","enum":["24h","7d","30d"]}},{"name":"limit","in":"query","required":false,"description":"page size, clamped to 1–200","schema":{"description":"page size, clamped to 1–200","default":50,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"offset","in":"query","required":false,"description":"rows to skip, at most 1000","schema":{"description":"rows to skip, at most 1000","default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"stable id: <source>:<row id>[:resolved]"},"at":{"type":"string","description":"ISO 8601, UTC (…Z)"},"kind":{"type":"string","enum":["incident","resolved","push","maintenance","paused","resumed","published"]},"incidentKind":{"description":"for incident and resolved events, as in /api/incidents","type":"string"},"tone":{"type":"string","enum":["down","warning","change"],"description":"a problem in its severity, or a change"},"glyph":{"type":"string","enum":["problem","search","config","push","published","paused"],"description":"what kind of change: drawn as the chart rail's shape"},"label":{"type":"string","description":"one line in our words; for a push, its commit's first line"},"detail":{"description":"an incident's cause, a push's repo and author, a window's reason","type":["string","null"]},"before":{"type":"string"},"after":{"type":"string"},"href":{"description":"the commit, or the incident on the dashboard","type":"string"},"targetId":{"type":["string","null"]},"until":{"description":"a maintenance window's end","type":"string"}},"required":["id","at","kind","tone","glyph","label"],"additionalProperties":false}},"limit":{"type":"integer","description":"page size used (1–100)"},"offset":{"type":"integer","description":"rows skipped"},"has_more":{"type":"boolean","description":"another page follows"},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data","limit","offset","has_more"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/incidents":{"get":{"operationId":"incidents","summary":"Incidents, open now or recent; open outages and slowdowns carry the likely cause","description":"Call this to see what went wrong and why: open and recent incidents, newest first, with the likely cause on open outages and slowdowns. Page through with limit and offset.","security":[{"bearer":["viewer"]}],"parameters":[{"name":"state","in":"query","required":false,"description":"open: open now; recent: newest first, open or closed","schema":{"default":"open","description":"open: open now; recent: newest first, open or closed","type":"string","enum":["open","recent"]}},{"name":"site","in":"query","required":false,"description":"site slug","schema":{"description":"site slug","type":"string"}},{"name":"limit","in":"query","required":false,"description":"page size, clamped to 1–100","schema":{"description":"page size, clamped to 1–100","default":20,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"offset","in":"query","required":false,"description":"rows to skip, at most 1000","schema":{"description":"rows to skip, at most 1000","default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"severity":{"type":"string","enum":["down","warning"]},"site":{"description":"site slug","type":["string","null"]},"url":{"description":"the page or file it's about","type":["string","null"]},"domain":{"type":["string","null"]},"startedAt":{"type":"string","description":"ISO 8601, UTC (…Z)"},"resolvedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"cause":{"type":["string","null"]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dismissed":{"anyOf":[{"type":"object","properties":{"by":{"type":"string"},"at":{"type":"string","description":"ISO 8601, UTC (…Z)"}},"required":["by","at"],"additionalProperties":false},{"type":"null"}],"description":"the team marked it as noise: still open, never alerts again"},"likelyCause":{"description":"open outages and slowdowns only: the monitor's rules, as in the alert","anyOf":[{"type":"object","properties":{"likely":{"type":["string","null"]},"clues":{"type":"array","items":{"type":"string"}}},"required":["likely","clues"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","label","severity","site","url","domain","startedAt","resolvedAt","cause","details","dismissed"],"additionalProperties":false}},"limit":{"type":"integer","description":"page size used (1–100)"},"offset":{"type":"integer","description":"rows skipped"},"has_more":{"type":"boolean","description":"another page follows"},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data","limit","offset","has_more"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/domains":{"get":{"operationId":"domains","summary":"The team's domains: registration expiry, registrar, nameservers, status","description":"Call this to check renewals: which domains expire soon, who the registrar is, and whether nameservers or registry locks changed.","security":[{"bearer":["viewer"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"daysLeft":{"type":["number","null"]},"registrar":{"type":["string","null"]},"nameservers":{"type":"array","items":{"type":"string"}},"statusFlags":{"type":"array","items":{"type":"string"}},"lastCheckedAt":{"anyOf":[{"type":"string","description":"ISO 8601, UTC (…Z)"},{"type":"null"}]},"sites":{"type":"array","items":{"type":"string"}}},"required":["name","expiresAt","daysLeft","registrar","nameservers","statusFlags","lastCheckedAt","sites"],"additionalProperties":false}},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/incidents/{id}/dismiss":{"post":{"operationId":"incidents_by_id_dismiss","summary":"Dismiss an open incident as noise","description":"Hides it from the open lists for the whole team; it never alerts again and closes without a message. Not every kind can be dismissed (409). Needs a Member or Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["member"]}],"x-idempotent":true,"parameters":[{"name":"id","in":"path","required":true,"description":"incident id, as in /api/incidents","schema":{"type":"string","description":"incident id, as in /api/incidents"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"site":{"description":"its site's slug","type":["string","null"]},"dismissed":{"type":"boolean"},"recheckRequested":{"type":"boolean"}},"required":["id","kind","site","dismissed","recheckRequested"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This incident can't take this action (conflict)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/incidents/{id}/undismiss":{"post":{"operationId":"incidents_by_id_undismiss","summary":"Bring back a dismissed incident","description":"Undoes a dismiss: the incident shows and alerts again. Needs a Member or Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["member"]}],"x-idempotent":true,"parameters":[{"name":"id","in":"path","required":true,"description":"incident id, as in /api/incidents","schema":{"type":"string","description":"incident id, as in /api/incidents"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"site":{"description":"its site's slug","type":["string","null"]},"dismissed":{"type":"boolean"},"recheckRequested":{"type":"boolean"}},"required":["id","kind","site","dismissed","recheckRequested"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This incident can't take this action (conflict)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/incidents/{id}/recheck":{"post":{"operationId":"incidents_by_id_recheck","summary":"Check an incident again now","description":"The monitor checks it again within 30 seconds, after a fix, instead of waiting for the next scheduled check. Not every kind can be checked again (409). Needs a Member or Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["member"]}],"x-idempotent":true,"parameters":[{"name":"id","in":"path","required":true,"description":"incident id, as in /api/incidents","schema":{"type":"string","description":"incident id, as in /api/incidents"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"site":{"description":"its site's slug","type":["string","null"]},"dismissed":{"type":"boolean"},"recheckRequested":{"type":"boolean"}},"required":["id","kind","site","dismissed","recheckRequested"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This incident can't take this action (conflict)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/maintenance/start":{"post":{"operationId":"sites_by_slug_maintenance_start","summary":"Start a maintenance window on a site now","description":"Call this before a deploy: alerts for the site are held (checks still run) until the window ends, after `minutes` (default 30, at most 24 hours) or when you end it. Starting again replaces the open window. Needs a Member or Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["member"]}],"x-idempotent":true,"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"minutes":{"description":"how long, default 30","type":"integer","minimum":1,"maximum":1440},"reason":{"description":"the team's own words; never public","type":"string","maxLength":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"startsAt":{"type":"string","description":"ISO 8601, UTC (…Z)"},"endsAt":{"type":"string","description":"ISO 8601, UTC (…Z)"},"reason":{"type":["string","null"]}},"required":["id","startsAt","endsAt","reason"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/maintenance/end":{"post":{"operationId":"sites_by_slug_maintenance_end","summary":"End a site's maintenance windows now","description":"Call this after a deploy: alerts for the site go out again from now. Ending with no window on answers `ended: 0`. Needs a Member or Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["member"]}],"x-idempotent":true,"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ended":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"windows ended"}},"required":["ended"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/pause":{"post":{"operationId":"sites_by_slug_pause","summary":"Pause a site's checks","description":"Stops every check of the site, keeping its history, until it's resumed. Nothing alerts while it's paused. Needs an Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["admin"]}],"x-idempotent":true,"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"paused":{"type":"boolean"}},"required":["slug","paused"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sites/{slug}/resume":{"post":{"operationId":"sites_by_slug_resume","summary":"Resume a paused site's checks","description":"Starts the site's checks again within a minute. Needs an Admin key, on a team with 10 sites or more. Idempotent: repeating it changes nothing more.","security":[{"bearer":["admin"]}],"x-idempotent":true,"parameters":[{"name":"slug","in":"path","required":true,"description":"site slug, as in /api/sites","schema":{"type":"string","description":"site slug, as in /api/sites"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"paused":{"type":"boolean"}},"required":["slug","paused"],"additionalProperties":false},"next_steps":{"type":"array","description":"calls that usually come next ({method, path, why, tool})","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"why":{"type":"string"},"tool":{"type":"string","description":"the MCP tool that makes this call, for data routes"}}}}},"required":["data"]}}}},"400":{"description":"Invalid parameters (validation_error)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key (unauthorized)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's role or the team's plan can't make this write (forbidden)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown site or incident (not_found)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests this minute, or writes in 10 seconds, for this key (rate_limited); see RateLimit and Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key or sign-in couldn't be checked right now (auth_unavailable); retry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}