{"openapi":"3.1.0","info":{"title":"Tinylytics API","version":"v1","description":"Machine-readable schema for Tinylytics API v1."},"servers":[{"url":"https://origin.tinylytics.app/api/v1"}],"paths":{"/":{"get":{"summary":"API discovery metadata","description":"Public discovery endpoint with authentication details, docs links, and endpoint directory.","operationId":"getApiDiscovery","tags":["Discovery"],"responses":{"200":{"description":"Successful response."}},"security":[]}},"/accounts":{"get":{"summary":"List accounts","description":"List the personal account and active team accounts available to the current API key.","operationId":"listAccounts","tags":["Account"],"responses":{"200":{"description":"Successful response."}},"security":[{"bearerAuth":[]}]}},"/agent_signups":{"post":{"summary":"Start agent signup","description":"Start Tinylytics signup for a human owner. The 14-day trial starts when they activate. Public and unauthenticated. Returns a status_token for polling. The activation link is emailed to the owner and never returned. Does not mint API keys.","operationId":"createAgentSignup","tags":["Agent signup"],"responses":{"201":{"description":"Pending owner signup created."},"200":{"description":"Email already has an account."},"422":{"description":"Invalid email, ToS, plan, or blocked address."},"429":{"description":"Rate limit exceeded."}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","tos_accepted"],"properties":{"email":{"type":"string"},"tos_accepted":{"type":"boolean"},"agent_name":{"type":"string"},"agent_client":{"type":"string"},"site_url":{"type":"string"},"intended_plan":{"type":"string","enum":["zen","pro","ultra"]}}}}}}}},"/agent_signups/:id":{"get":{"summary":"Poll agent signup","description":"Poll signup status with the status_token from create, sent as X-Agent-Signup-Token or token. Never returns API keys or passwords.","operationId":"getAgentSignup","tags":["Agent signup"],"responses":{"200":{"description":"Signup status."},"404":{"description":"Unknown id or bad token."},"429":{"description":"Rate limit exceeded."}},"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":false,"description":"status_token from create. Fallback if `X-Agent-Signup-Token` is not sent.","schema":{"type":"string"}},{"name":"X-Agent-Signup-Token","in":"header","required":false,"description":"status_token from create. Prefer this over `token` so it is less likely to land in access logs.","schema":{"type":"string"}}]}},"/cross_site_referrals":{"get":{"summary":"List cross-site referrals","description":"List referrals between the owner's own sites for the selected account or group. Only referrer hostnames that map to accessible sites are included.","operationId":"listCrossSiteReferrals","tags":["Analytics"],"responses":{"200":{"description":"Successful response."},"400":{"description":"Invalid parameter value or date format."},"403":{"description":"This endpoint requires an Ultra subscription when group_id is set."},"404":{"description":"Group not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"group_id","in":"query","required":false,"description":"Limit to sites in this group. Requires Ultra.","schema":{"type":"integer"}},{"name":"start_date","in":"query","required":false,"description":"Range start date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Range end date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"Date-boundary mode.","schema":{"type":"string","enum":["utc","user"]}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/groups":{"get":{"summary":"List groups","description":"List site groups for the current user. Requires an Ultra subscription.","operationId":"listGroups","tags":["Groups"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an Ultra subscription."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create group","description":"Create a site group for the current user. Requires a full-access API key and Ultra subscription.","operationId":"createGroup","tags":["Groups"],"responses":{"201":{"description":"Group created."},"403":{"description":"Write access required or Ultra subscription required."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"accent_color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"pinned":{"type":"boolean"},"default_chart_view":{"type":"string","enum":["separate","combined"]},"site_ids":{"type":"array","items":{"type":"integer"}}},"required":["name"]}}}}}},"/groups/:id":{"delete":{"summary":"Delete group","description":"Delete one site group by numeric ID. Requires a full-access API key and Ultra subscription.","operationId":"deleteGroup","tags":["Groups"],"responses":{"204":{"description":"Group deleted."},"403":{"description":"Write access required or Ultra subscription required."},"404":{"description":"Group not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"get":{"summary":"Get group","description":"Fetch one site group by numeric ID. Requires an Ultra subscription.","operationId":"getGroup","tags":["Groups"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an Ultra subscription."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"patch":{"summary":"Update group","description":"Update one site group by numeric ID. Requires a full-access API key and Ultra subscription.","operationId":"updateGroup","tags":["Groups"],"responses":{"200":{"description":"Group updated."},"403":{"description":"Write access required or Ultra subscription required."},"404":{"description":"Group not found."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"accent_color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"pinned":{"type":"boolean"},"default_chart_view":{"type":"string","enum":["separate","combined"]},"site_ids":{"type":"array","items":{"type":"integer"}}}}}}}},"put":{"summary":"Update group","description":"Update one site group by numeric ID. Requires a full-access API key and Ultra subscription.","operationId":"replaceGroup","tags":["Groups"],"responses":{"200":{"description":"Group updated."},"403":{"description":"Write access required or Ultra subscription required."},"404":{"description":"Group not found."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"accent_color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"pinned":{"type":"boolean"},"default_chart_view":{"type":"string","enum":["separate","combined"]},"site_ids":{"type":"array","items":{"type":"integer"}}}}}}}}},"/me":{"get":{"summary":"Get current user","description":"Validate API key and return current account plus API key metadata.","operationId":"getCurrentUser","tags":["Account"],"responses":{"200":{"description":"Successful response."}},"security":[{"bearerAuth":[]}]}},"/openapi.json":{"get":{"summary":"OpenAPI schema","description":"OpenAPI 3.1 schema for Tinylytics API v1.","operationId":"getOpenApiSchema","tags":["Discovery"],"responses":{"200":{"description":"Successful response."}},"security":[]}},"/sites":{"get":{"summary":"List sites","description":"List sites available to the current authenticated user. Each site includes optional plain-text notes, group_ids, and widgets settings. Date-range period_unique_hits is distinct unique_hash (sites-index Unique rollup), not list-hits unique_visitors.","operationId":"listSites","tags":["Sites"],"responses":{"200":{"description":"Successful response."},"400":{"description":"Invalid parameter value or date format."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"description":"Range start date (`YYYY-MM-DD`). When set, each site includes period_hits and period_unique_hits (distinct unique_hash Unique rollup, not unique_visitors).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Range end date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"Date-boundary mode.","schema":{"type":"string","enum":["utc","user"]}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create site","description":"Create a site for the selected account owner. Omit account_id for the key owner's personal account. Requires a full-access API key and owner or team-admin access.","operationId":"createSite","tags":["Sites"],"responses":{"201":{"description":"Site created."},"422":{"description":"Validation or plan limit error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"},"notes":{"type":"string"},"display_root_path":{"type":"string"},"public":{"type":"boolean"},"is_public":{"type":"boolean"},"active":{"type":"boolean"},"allow_from_any_domain":{"type":"boolean"},"fetch_icon":{"type":"boolean","description":"Use the icon from the site's homepage as its icon, refreshed every two weeks. On by default for new sites."}},"required":["url"]}}}}}},"/sites/:id":{"delete":{"summary":"Delete site","description":"Soft-delete one site by numeric ID and queue background cleanup. Requires a full-access API key.","operationId":"deleteSite","tags":["Sites"],"responses":{"204":{"description":"Site deleted."},"404":{"description":"Site not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"get":{"summary":"Get site","description":"Fetch one site by numeric ID. Includes optional plain-text notes, group_ids, and widgets (events, auto_events, beacon, and each widget's on/off and style).","operationId":"getSite","tags":["Sites"],"responses":{"200":{"description":"Successful response."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"patch":{"summary":"Update site","description":"Update one site by numeric ID, including optional plain-text notes stored as rich text and a partial widgets object (only the keys sent change; unknown keys are rejected). Requires a full-access API key.","operationId":"updateSite","tags":["Sites"],"responses":{"200":{"description":"Site updated."},"404":{"description":"Site not found."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"},"notes":{"type":"string"},"display_root_path":{"type":"string"},"public":{"type":"boolean"},"is_public":{"type":"boolean"},"active":{"type":"boolean"},"allow_from_any_domain":{"type":"boolean"},"fetch_icon":{"type":"boolean","description":"Use the icon from the site's homepage as its icon, refreshed every two weeks. On by default for new sites."},"widgets":{"type":"object","additionalProperties":false,"properties":{"events":{"type":"boolean"},"auto_events":{"type":"boolean"},"beacon":{"type":"boolean"},"hits":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"unique":{"type":"boolean"},"style":{"type":["string","null"],"enum":["flap","odometer","web","lcd",null]}}},"kudos":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"symbol":{"type":"string","maxLength":20},"effect":{"type":["string","null"],"enum":["random","confetti","emoji_rain","hearts","fireworks","coin","power_up","pixel_sparkles","crt","ripple","petals","sparkle",null]},"sound":{"type":"boolean"}}},"uptime":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"style":{"type":["string","null"],"enum":["pill","strip",null]}}},"countries":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"style":{"type":["string","null"],"enum":["map","stamps",null]}}},"webring":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"avatars":{"type":"boolean"}}},"public_stats":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}},"stats":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}},"webmentions":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}}},"description":"Partial widget settings. Only the keys sent change."}}}}}}},"put":{"summary":"Update site","description":"Update one site by numeric ID, including optional plain-text notes stored as rich text and a partial widgets object (only the keys sent change; unknown keys are rejected). Requires a full-access API key.","operationId":"replaceSite","tags":["Sites"],"responses":{"200":{"description":"Site updated."},"404":{"description":"Site not found."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"},"notes":{"type":"string"},"display_root_path":{"type":"string"},"public":{"type":"boolean"},"is_public":{"type":"boolean"},"active":{"type":"boolean"},"allow_from_any_domain":{"type":"boolean"},"fetch_icon":{"type":"boolean","description":"Use the icon from the site's homepage as its icon, refreshed every two weeks. On by default for new sites."},"widgets":{"type":"object","additionalProperties":false,"properties":{"events":{"type":"boolean"},"auto_events":{"type":"boolean"},"beacon":{"type":"boolean"},"hits":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"unique":{"type":"boolean"},"style":{"type":["string","null"],"enum":["flap","odometer","web","lcd",null]}}},"kudos":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"symbol":{"type":"string","maxLength":20},"effect":{"type":["string","null"],"enum":["random","confetti","emoji_rain","hearts","fireworks","coin","power_up","pixel_sparkles","crt","ripple","petals","sparkle",null]},"sound":{"type":"boolean"}}},"uptime":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"style":{"type":["string","null"],"enum":["pill","strip",null]}}},"countries":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"style":{"type":["string","null"],"enum":["map","stamps",null]}}},"webring":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"avatars":{"type":"boolean"}}},"public_stats":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}},"stats":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}},"webmentions":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}}},"description":"Partial widget settings. Only the keys sent change."}}}}}}}},"/sites/:id/agent_visits":{"get":{"summary":"List AI agent visits","description":"Read AI assistant and crawler visits for a site. These are stored separately from human hits.","operationId":"listSiteAgentVisits","tags":["Analytics"],"responses":{"200":{"description":"Successful response."},"400":{"description":"Invalid parameter value or date format."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"start_date","in":"query","required":false,"description":"Range start date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Range end date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"Date-boundary mode.","schema":{"type":"string","enum":["utc","user"]}},{"name":"path","in":"query","required":false,"description":"Exact path filter.","schema":{"type":"string"}},{"name":"agent_name","in":"query","required":false,"description":"Exact agent name filter.","schema":{"type":"string"}},{"name":"provider","in":"query","required":false,"description":"Exact provider filter.","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Exact category filter.","schema":{"type":"string","enum":["answer_fetch","search_index","training","ai_crawler"]}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","required":false,"description":"Page size.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create AI agent visit","description":"Record one AI crawler request. Known crawler user agents are classified automatically. Requires a full-access API key.","operationId":"createSiteAgentVisit","tags":["Analytics"],"responses":{"201":{"description":"Agent visit created."},"202":{"description":"Request accepted but not a known AI crawler."},"422":{"description":"Validation or payload error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"ip_address":{"type":"string"},"url":{"type":"string"},"referrer":{"type":"string"},"user_agent":{"type":"string"},"visitor_id":{"type":"string"},"source":{"type":"string"}}}}}}}},"/sites/:id/content":{"get":{"summary":"Get content monitoring","description":"Return content monitoring status, issues, and stats for a site. Issues include found_on_url, the pages where that link or resource was found. Requires an active subscription.","operationId":"getSiteContentMonitoring","tags":["Monitoring"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an active subscription."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/content/:content_check_id/ignore":{"patch":{"summary":"Ignore content check","description":"Ignore one content monitoring issue so it no longer appears in the open queue. Requires a full-access API key and an active subscription.","operationId":"ignoreSiteContentCheck","tags":["Monitoring"],"responses":{"200":{"description":"Content check updated."},"403":{"description":"Write access required, subscription required, or content monitoring disabled."},"404":{"description":"Content check not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"content_check_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/content/:content_check_id/recheck":{"post":{"summary":"Recheck content check","description":"Queue a recheck of one content monitoring URL. Requires a full-access API key and an active subscription.","operationId":"recheckSiteContentCheck","tags":["Monitoring"],"responses":{"202":{"description":"Recheck queued."},"403":{"description":"Write access required, subscription required, or content monitoring disabled."},"404":{"description":"Content check not found."},"422":{"description":"URL is outside content monitoring scope."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"content_check_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/content/:content_check_id/unignore":{"patch":{"summary":"Unignore content check","description":"Restore one ignored content monitoring issue to the open queue. Requires a full-access API key and an active subscription.","operationId":"unignoreSiteContentCheck","tags":["Monitoring"],"responses":{"200":{"description":"Content check updated."},"403":{"description":"Write access required, subscription required, or content monitoring disabled."},"404":{"description":"Content check not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"content_check_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/events":{"post":{"summary":"Create event","description":"Create one event for a site. Requires a full-access API key.","operationId":"createSiteEvent","tags":["Analytics"],"responses":{"201":{"description":"Event created."},"202":{"description":"Event accepted but ignored by rules."},"422":{"description":"Validation or payload error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["event"],"properties":{"event":{"type":"string"},"value":{"type":"string"},"path":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"ip_address":{"type":"string"},"url":{"type":"string"},"referrer":{"type":"string"},"user_agent":{"type":"string"},"visitor_id":{"type":"string"},"source":{"type":"string"}}}}}}}},"/sites/:id/events/batch":{"post":{"summary":"Batch create events","description":"Create up to 1000 events in one request. Requires a full-access API key.","operationId":"createSiteEventsBatch","tags":["Analytics"],"responses":{"200":{"description":"Batch processed with per-row statuses."},"422":{"description":"Payload must be a JSON array of at most 1000 events."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["event"],"properties":{"event":{"type":"string"},"value":{"type":"string"},"path":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"ip_address":{"type":"string"},"url":{"type":"string"},"referrer":{"type":"string"},"user_agent":{"type":"string"},"visitor_id":{"type":"string"},"source":{"type":"string"}}}}}}}}},"/sites/:id/features":{"patch":{"summary":"Update site features","description":"Enable or disable content monitoring and uptime monitoring for one site. Widget settings live on PATCH /api/v1/sites/:id. Requires a full-access API key.","operationId":"updateSiteFeatures","tags":["Sites"],"responses":{"200":{"description":"Site features updated."},"403":{"description":"Write access required."},"404":{"description":"Site not found."},"422":{"description":"Validation or plan limit error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content_monitoring":{"type":"boolean"},"content_monitoring_emails":{"type":"boolean"},"uptime":{"type":"boolean"}}}}}}},"put":{"summary":"Update site features","description":"Enable or disable content monitoring and uptime monitoring for one site. Widget settings live on PATCH /api/v1/sites/:id. Requires a full-access API key.","operationId":"replaceSiteFeatures","tags":["Sites"],"responses":{"200":{"description":"Site features updated."},"403":{"description":"Write access required."},"404":{"description":"Site not found."},"422":{"description":"Validation or plan limit error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content_monitoring":{"type":"boolean"},"content_monitoring_emails":{"type":"boolean"},"uptime":{"type":"boolean"}}}}}}}},"/sites/:id/hits":{"get":{"summary":"List hits","description":"Read raw or grouped analytics hits for a site. summary.unique_visitors is distinct visitor_hash for the filtered window (unique_basis visitor_hash); do not equate it with list-sites period_unique_hits.","operationId":"listSiteHits","tags":["Analytics"],"responses":{"200":{"description":"Successful response."},"400":{"description":"Invalid parameter value or date format."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"start_date","in":"query","required":false,"description":"Range start date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Range end date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"Date-boundary mode.","schema":{"type":"string","enum":["utc","user"]}},{"name":"country","in":"query","required":false,"description":"Exact 2-letter country code.","schema":{"type":"string"}},{"name":"path","in":"query","required":false,"description":"Exact path filter.","schema":{"type":"string"}},{"name":"referrer","in":"query","required":false,"description":"Case-insensitive partial referrer filter.","schema":{"type":"string"}},{"name":"grouped","in":"query","required":false,"description":"Return grouped results when true.","schema":{"type":"boolean"}},{"name":"group_by","in":"query","required":false,"description":"Grouping field for grouped results. Referrer grouping collapses empty, null, and the literal `direct` into one null (direct / none) row.","schema":{"type":"string","enum":["path","country","referrer","browser_name","platform_name","source","date"]}},{"name":"interval","in":"query","required":false,"description":"Date bucket size when group_by is date.","schema":{"type":"string","enum":["day","week","month"]}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","required":false,"description":"Page size.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create hit","description":"Create one hit for a site. Requires a full-access API key.","operationId":"createSiteHit","tags":["Analytics"],"responses":{"201":{"description":"Hit created."},"202":{"description":"Hit accepted but ignored by rules."},"422":{"description":"Validation or payload error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"ip_address":{"type":"string"},"url":{"type":"string"},"referrer":{"type":"string"},"user_agent":{"type":"string"},"visitor_id":{"type":"string"},"source":{"type":"string"}}}}}}}},"/sites/:id/hits/batch":{"post":{"summary":"Batch create hits","description":"Create up to 1000 hits in one request. Requires a full-access API key.","operationId":"createSiteHitsBatch","tags":["Analytics"],"responses":{"200":{"description":"Batch processed with per-row statuses."},"422":{"description":"Payload must be a JSON array of at most 1000 hits."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"ip_address":{"type":"string"},"url":{"type":"string"},"referrer":{"type":"string"},"user_agent":{"type":"string"},"visitor_id":{"type":"string"},"source":{"type":"string"}}}}}}}}},"/sites/:id/hits/import":{"post":{"summary":"Import historical hits","description":"Import up to 1000 historical hits in one request, each keeping its own created_at. For backfilling history from another analytics tool, not live traffic: no webhooks fire and importing the same hits twice adds them twice. Requires a full-access API key.","operationId":"importSiteHits","tags":["Analytics"],"responses":{"200":{"description":"Import processed with per-row statuses."},"422":{"description":"Payload must be a JSON array of at most 1000 hits."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["path","created_at"],"properties":{"path":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"ip_address":{"type":"string"},"url":{"type":"string"},"referrer":{"type":"string"},"user_agent":{"type":"string"},"visitor_id":{"type":"string"},"source":{"type":"string"}}}}}}}}},"/sites/:id/insights":{"get":{"summary":"Get insights","description":"Return AI insights generated for a site. Requires an active subscription.","operationId":"getSiteInsights","tags":["Insights"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an active subscription."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/kudos":{"get":{"summary":"List kudos","description":"Read kudos records for a site.","operationId":"listSiteKudos","tags":["Analytics"],"responses":{"200":{"description":"Successful response."},"400":{"description":"Invalid parameter value or date format."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"start_date","in":"query","required":false,"description":"Range start date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Range end date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"Date-boundary mode.","schema":{"type":"string","enum":["utc","user"]}},{"name":"path","in":"query","required":false,"description":"Exact path filter.","schema":{"type":"string"}},{"name":"uid","in":"query","required":false,"description":"Exact kudo UID filter.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","required":false,"description":"Page size.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create kudo","description":"Create one kudo for a site. Requires a full-access API key.","operationId":"createSiteKudo","tags":["Analytics"],"responses":{"201":{"description":"Kudo created."},"202":{"description":"Kudo accepted but ignored by rules."},"422":{"description":"Validation or payload error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"custom_uid":{"type":"string"}}}}}}}},"/sites/:id/kudos/:kudo_uid":{"delete":{"summary":"Delete kudo","description":"Delete one kudo by UID. Requires a full-access API key.","operationId":"deleteSiteKudo","tags":["Analytics"],"responses":{"200":{"description":"Kudo deleted."},"404":{"description":"Kudo not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"kudo_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/leaderboard":{"get":{"summary":"Get leaderboard","description":"Return the all-time top 1,000 paths for a site from the background-refreshed dashboard count, with ignore rules and ignored paths applied. Returns an empty leaderboard with cache_info.refreshing true while the first count runs.","operationId":"getSiteLeaderboard","tags":["Analytics"],"responses":{"200":{"description":"Successful response."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/seo_audits":{"get":{"summary":"List SEO audits","description":"Return recent SEO audits for a site, newest first, with issue counts by severity. Requires an Ultra subscription.","operationId":"listSiteSeoAudits","tags":["Monitoring"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an Ultra subscription."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","required":false,"description":"Page size.","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Run SEO audit","description":"Queue an SEO audit for a site. One run per hour, and not while another is running. Requires a full-access API key and an Ultra subscription.","operationId":"createSiteSeoAudit","tags":["Monitoring"],"responses":{"202":{"description":"SEO audit queued."},"403":{"description":"Write access required or Ultra subscription required."},"409":{"description":"An SEO audit is already running."},"422":{"description":"An audit ran in the last hour, or the site is inactive."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/seo_audits/:audit_id":{"get":{"summary":"Get SEO audit","description":"Return one SEO audit with robots.txt and sitemap findings, search landing pages, AI crawler access and visits, ranked recommendations, and every audited page with its issues, search views, AI crawler visits, and broken links. Requires an Ultra subscription.","operationId":"getSiteSeoAudit","tags":["Monitoring"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an Ultra subscription."},"404":{"description":"Site or SEO audit not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"audit_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/seo_audits/latest":{"get":{"summary":"Get latest SEO audit","description":"Return the most recent SEO audit for a site with robots.txt and sitemap findings, search landing pages, AI crawler access and visits, ranked recommendations, and every audited page with its issues, search views, AI crawler visits, and broken links. Requires an Ultra subscription.","operationId":"getSiteLatestSeoAudit","tags":["Monitoring"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an Ultra subscription."},"404":{"description":"Site or SEO audit not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/seo_dismissals":{"post":{"summary":"Dismiss SEO issue","description":"Dismiss one SEO issue code on one path, or a site-wide issue when path is omitted. Dismissed issues are left out of counts, comparisons, the fix list, and the issue lists in every audit until restored. Requires a full-access API key and an Ultra subscription.","operationId":"createSiteSeoDismissal","tags":["Monitoring"],"responses":{"200":{"description":"The issue was already dismissed."},"201":{"description":"Issue dismissed."},"403":{"description":"Write access required or Ultra subscription required."},"422":{"description":"Unknown issue code, or a path is missing for a page issue."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["fetch_failed","too_many_redirects","http_error","blocked_by_robots","noindex","missing_title","missing_meta_description","missing_h1","missing_viewport","canonical_points_elsewhere","duplicate_title","slow_response","missing_sitemap","invalid_json_ld","http_not_redirected_to_https","www_inconsistent","title_too_short","title_too_long","meta_description_too_short","meta_description_too_long","duplicate_meta_description","multiple_h1","missing_canonical","missing_og_tags","images_missing_alt","missing_lang","redirected","not_html","not_in_sitemap","missing_robots_txt","heading_levels_skipped","thin_content","invalid_hreflang","structured_data_incomplete","no_internal_links_in","og_image_unreachable","no_compression","no_cache_headers","large_html","trailing_slash_inconsistent","missing_hsts","broken_links","ai_crawlers_blocked","ai_crawlers_blocked_on_page","missing_llms_txt"]},"path":{"type":"string","description":"Page path from the audit. Omit for site-wide issues (missing_robots_txt, missing_sitemap, http_not_redirected_to_https, www_inconsistent, trailing_slash_inconsistent, missing_hsts, ai_crawlers_blocked, missing_llms_txt)."}}}}}}}},"/sites/:id/seo_dismissals/:dismissal_id":{"delete":{"summary":"Restore SEO issue","description":"Remove a dismissal so the issue counts again. Requires a full-access API key and an Ultra subscription.","operationId":"deleteSiteSeoDismissal","tags":["Monitoring"],"responses":{"200":{"description":"Dismissal removed."},"403":{"description":"Write access required or Ultra subscription required."},"404":{"description":"Site or dismissal not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"dismissal_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/seo_pages/:page_id/recheck":{"post":{"summary":"Recheck SEO page","description":"Queue a fresh check of one page from the latest completed SEO audit. Updates that page, the duplicate title and description checks, robots.txt and sitemap findings, and the audit's counts. Once per page every two minutes, and not while a full audit is running. Requires a full-access API key and an Ultra subscription.","operationId":"recheckSiteSeoPage","tags":["Monitoring"],"responses":{"202":{"description":"Page recheck queued."},"403":{"description":"Write access required or Ultra subscription required."},"404":{"description":"Site not found, or the page is not in the latest completed audit."},"409":{"description":"An SEO audit is running."},"422":{"description":"The page was checked in the last two minutes, or the site is inactive."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/signals":{"get":{"summary":"List signals","description":"Return owner-submitted context signals for a site. Requires an active subscription and insights enabled.","operationId":"listSiteSignals","tags":["Insights"],"responses":{"200":{"description":"Successful response."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create signal","description":"Submit one owner context signal for a site. Requires a full-access API key, subscription, and insights enabled.","operationId":"createSiteSignal","tags":["Insights"],"responses":{"200":{"description":"Successful response."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/uptime":{"get":{"summary":"Get uptime","description":"Return uptime, SSL/domain status, and downtime history for a site. Requires an active subscription.","operationId":"getSiteUptime","tags":["Monitoring"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an active subscription."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/sites/:id/user_journeys":{"get":{"summary":"Get user journeys","description":"Return visitor journey analytics for a site.","operationId":"getSiteUserJourneys","tags":["Analytics"],"responses":{"200":{"description":"Successful response."},"400":{"description":"Invalid parameter value or date format."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"start_date","in":"query","required":false,"description":"Range start date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"end_date","in":"query","required":false,"description":"Range end date (`YYYY-MM-DD`).","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"Date-boundary mode.","schema":{"type":"string","enum":["utc","user"]}},{"name":"page","in":"query","required":false,"description":"Page number.","schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","required":false,"description":"Page size.","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/webhooks":{"get":{"summary":"List webhooks","description":"List outbound webhooks for the selected account. Signing secrets are not included. Requires an active subscription.","operationId":"listWebhooks","tags":["Webhooks"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an active subscription."},"404":{"description":"Webhook not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"post":{"summary":"Create webhook","description":"Create an outbound webhook and return signing_secret once. Requires a full-access API key and an active subscription.","operationId":"createWebhook","tags":["Webhooks"],"responses":{"201":{"description":"Webhook created. signing_secret is included once."},"403":{"description":"Write access required or subscription required."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public HTTP or HTTPS endpoint. Required for generic, discord, and mattermost; omitted for pushover."},"name":{"type":"string"},"platform":{"type":"string","enum":["generic","discord","mattermost","pushover"]},"active":{"type":"boolean"},"wrap_content":{"type":"boolean"},"pushover_app_token":{"type":"string","description":"Pushover application API token (30 characters). Required for pushover; write-only, never returned."},"pushover_user_key":{"type":"string","description":"Pushover user or group key (30 characters). Required for pushover; write-only, never returned."},"event_types":{"type":"array","items":{"type":"string","enum":["monitor_down","monitor_up","new_hit","new_kudo","new_webmention","new_event","new_insight","content_issue","seo_audit.completed"]}},"site_ids":{"type":"array","items":{"type":"integer"},"description":"Owned site IDs to receive events for. Empty array means all sites."}}}}}}}},"/webhooks/:id":{"delete":{"summary":"Delete webhook","description":"Delete one outbound webhook. Requires a full-access API key and an active subscription.","operationId":"deleteWebhook","tags":["Webhooks"],"responses":{"204":{"description":"Webhook deleted."},"403":{"description":"Write access required or subscription required."},"404":{"description":"Webhook not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"get":{"summary":"Get webhook","description":"Fetch one outbound webhook. Signing secret is not included. Requires an active subscription.","operationId":"getWebhook","tags":["Webhooks"],"responses":{"200":{"description":"Successful response."},"403":{"description":"This endpoint requires an active subscription."},"404":{"description":"Webhook not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]},"patch":{"summary":"Update webhook","description":"Update one outbound webhook. Requires a full-access API key and an active subscription.","operationId":"updateWebhook","tags":["Webhooks"],"responses":{"200":{"description":"Webhook updated."},"403":{"description":"Write access required or subscription required."},"404":{"description":"Webhook not found."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public HTTP or HTTPS endpoint. Required for generic, discord, and mattermost; omitted for pushover."},"name":{"type":"string"},"platform":{"type":"string","enum":["generic","discord","mattermost","pushover"]},"active":{"type":"boolean"},"wrap_content":{"type":"boolean"},"pushover_app_token":{"type":"string","description":"Pushover application API token (30 characters). Required for pushover; write-only, never returned."},"pushover_user_key":{"type":"string","description":"Pushover user or group key (30 characters). Required for pushover; write-only, never returned."},"event_types":{"type":"array","items":{"type":"string","enum":["monitor_down","monitor_up","new_hit","new_kudo","new_webmention","new_event","new_insight","content_issue","seo_audit.completed"]}},"site_ids":{"type":"array","items":{"type":"integer"},"description":"Owned site IDs to receive events for. Empty array means all sites."}}}}}}},"put":{"summary":"Update webhook","description":"Update one outbound webhook. Requires a full-access API key and an active subscription.","operationId":"replaceWebhook","tags":["Webhooks"],"responses":{"200":{"description":"Webhook updated."},"403":{"description":"Write access required or subscription required."},"404":{"description":"Webhook not found."},"422":{"description":"Validation error."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public HTTP or HTTPS endpoint. Required for generic, discord, and mattermost; omitted for pushover."},"name":{"type":"string"},"platform":{"type":"string","enum":["generic","discord","mattermost","pushover"]},"active":{"type":"boolean"},"wrap_content":{"type":"boolean"},"pushover_app_token":{"type":"string","description":"Pushover application API token (30 characters). Required for pushover; write-only, never returned."},"pushover_user_key":{"type":"string","description":"Pushover user or group key (30 characters). Required for pushover; write-only, never returned."},"event_types":{"type":"array","items":{"type":"string","enum":["monitor_down","monitor_up","new_hit","new_kudo","new_webmention","new_event","new_insight","content_issue","seo_audit.completed"]}},"site_ids":{"type":"array","items":{"type":"integer"},"description":"Owned site IDs to receive events for. Empty array means all sites."}}}}}}}},"/webhooks/:id/regenerate_secret":{"post":{"summary":"Regenerate webhook secret","description":"Rotate the signing secret and return the new value once. Requires a full-access API key and an active subscription.","operationId":"regenerateWebhookSecret","tags":["Webhooks"],"responses":{"200":{"description":"Signing secret rotated."},"403":{"description":"Write access required or subscription required."},"404":{"description":"Webhook not found."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}]}},"/webhooks/:id/test":{"post":{"summary":"Test webhook","description":"Queue a test delivery to one outbound webhook. Requires a full-access API key and an active subscription.","operationId":"testWebhook","tags":["Webhooks"],"responses":{"202":{"description":"Test delivery queued."},"403":{"description":"Write access required or subscription required."},"404":{"description":"Webhook not found."},"422":{"description":"Unsupported event_type."}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"account_id","in":"query","required":false,"description":"Team account owner id. Omit for the key owner's personal account.","schema":{"type":"integer"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"event_type":{"type":"string","enum":["monitor_down","monitor_up","new_hit","new_kudo","new_webmention","new_event","new_insight","content_issue","seo_audit.completed"]}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}}}}