{"openapi":"3.1.0","info":{"title":"SitemapDiff API","version":"1.0.0","description":"Manage daily sitemap monitors, inspect scheduled check runs and URL changes, and configure notifications. The API intentionally has no manual run-now operation."},"servers":[{"url":"https://www.sitemapdiff.com/api/v1"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"NotificationChannel":{"type":"string","enum":["email","webhook","both","none"]},"Error":{"type":"object","required":["error","requestId"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}},"requestId":{"type":"string"}}}}},"paths":{"/account":{"get":{"summary":"Get account","operationId":"getAccount","responses":{"200":{"description":"Account details","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/account/notifications":{"get":{"summary":"Get account notification defaults","operationId":"getAccountNotifications","responses":{"200":{"description":"Notification settings","content":{"application/json":{"schema":{"type":"object"}}}}}},"patch":{"summary":"Update account notification defaults","operationId":"updateAccountNotifications","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channel"],"properties":{"channel":{"$ref":"#/components/schemas/NotificationChannel"},"webhookUrl":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Updated notification settings","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/account/notifications/test":{"post":{"summary":"Test account webhook","operationId":"testAccountWebhook","responses":{"200":{"description":"Test delivery result","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"Webhook is not configured","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors":{"get":{"summary":"List monitors","operationId":"listMonitors","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","error","paused","disabled"]}}],"responses":{"200":{"description":"Paginated monitors","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Create monitor","description":"Fetches and validates the sitemap immediately. It does not expose a manual check operation.","operationId":"createMonitor","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sitemapUrl"],"properties":{"sitemapUrl":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Created monitor","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"Monitor already exists or plan limit reached","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Sitemap could not be processed","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"summary":"Get monitor and statistics","operationId":"getMonitor","responses":{"200":{"description":"Monitor details","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Monitor not found","content":{"application/json":{"schema":{"type":"object"}}}}}},"patch":{"summary":"Pause or resume monitor","operationId":"updateMonitor","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["active","paused"]}}}}}},"responses":{"200":{"description":"Updated monitor","content":{"application/json":{"schema":{"type":"object"}}}}}},"delete":{"summary":"Delete monitor","operationId":"deleteMonitor","responses":{"204":{"description":"Monitor deleted"},"404":{"description":"Monitor not found","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}/notifications":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"summary":"Get monitor notification settings","operationId":"getMonitorNotifications","responses":{"200":{"description":"Override and effective settings","content":{"application/json":{"schema":{"type":"object"}}}}}},"patch":{"summary":"Update monitor notification settings","operationId":"updateMonitorNotifications","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"inherit"}}},{"type":"object","required":["mode","channel"],"properties":{"mode":{"const":"override"},"channel":{"$ref":"#/components/schemas/NotificationChannel"},"webhookUrl":{"type":"string","format":"uri"}}}]}}}},"responses":{"200":{"description":"Updated notification settings","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}/check-runs":{"get":{"summary":"List check runs","operationId":"listCheckRuns","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated check runs","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}/check-runs/{runId}":{"get":{"summary":"Get check run","operationId":"getCheckRun","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Check run","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}/changes":{"get":{"summary":"List changes","description":"Returns paginated change summaries by default. Set include=urls to include the complete addedUrls and removedUrls arrays in every item.","operationId":"listChanges","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"include","in":"query","schema":{"type":"string","enum":["urls"]},"description":"Include complete added and removed URL arrays."}],"responses":{"200":{"description":"Paginated changes","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid include value","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}/changes/latest":{"get":{"summary":"Get latest change","description":"Returns the newest change with its complete added and removed URL arrays.","operationId":"getLatestChange","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Latest change with added and removed URLs","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Monitor or change not found","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/monitors/{id}/changes/{changeId}":{"get":{"summary":"Get change","operationId":"getChange","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Change with added and removed URLs","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}