{"openapi":"3.1.0","info":{"title":"Citelyn API","version":"1.0.0","description":"Read how AI assistants and Google treat your site, and approve pages and placements. All times are UTC ISO 8601; money is in minor units with a currency code."},"servers":[{"url":"https://api.citelyn.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A Citelyn API key (ctl_live_...)."}}},"paths":{"/v1/sites":{"get":{"summary":"Your sites","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of sites"}}}},"/v1/sites/{domain}/visibility":{"get":{"summary":"AI visibility by question and engine","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"week","in":"query","schema":{"type":"string","format":"date"},"description":"Read the screen as it stood at the end of that week (a Monday)."}],"responses":{"200":{"description":"Visibility"}}}},"/v1/sites/{domain}/rankings":{"get":{"summary":"Google positions and AI Overviews","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"week","in":"query","schema":{"type":"string","format":"date"},"description":"Read the screen as it stood at the end of that week (a Monday)."}],"responses":{"200":{"description":"Rankings"}}}},"/v1/sites/{domain}/competitors":{"get":{"summary":"Competitors and their 8-week trend","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Competitors"}}}},"/v1/sites/{domain}/pages":{"get":{"summary":"Pages written for the site","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Pages"}}}},"/v1/sites/{domain}/page-questions":{"get":{"summary":"Questions for you about pages not yet written: your answers make the page yours","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Pages with questions"}}}},"/v1/sites/{domain}/placements":{"get":{"summary":"Listings and corrections being sought","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Placements"}}}},"/v1/sites/{domain}/placements/approve":{"post":{"description":"Needs a key with the read_act scope.","summary":"Approve sites to contact","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"Approved"}}}},"/v1/sites/{domain}/reports":{"get":{"summary":"Weekly figures, newest first","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Weeks"}}}},"/v1/sites/{domain}/reports/{week}":{"get":{"summary":"One weekly report","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"week","in":"path","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Report"}}}},"/v1/sites/{domain}/traffic":{"get":{"summary":"Visitors over the last 28 days, with AI-assistant sources, and what they did: checkout clicks and payments, forms started and sent, clicks, section time and scroll depth","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Traffic"}}}},"/v1/sites/{domain}/serp":{"get":{"summary":"Time to search results: for each page, when it started (published, or first in the sitemap), was crawled, indexed (Google, with the check window), first had an impression and first had a click, on Google and Bing; and the 30-day median hours to Google's index for pages Citelyn published","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Time to search results"}}}},"/v1/sites/{domain}/watch":{"get":{"summary":"Site watch: pages up or down, 30-day uptime, open and recent incidents, certificate and domain expiry, robots.txt, broken links and speed","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Watch"}}}},"/v1/pages/{id}":{"get":{"summary":"One page","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Page"}}}},"/v1/pages/{id}/answers":{"post":{"description":"Needs a key with the read_act scope.","summary":"Answer a page's questions; an answer already used in the page cannot change","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["answers"],"properties":{"answers":{"type":"array","items":{"type":"object","required":["id","answer"],"properties":{"id":{"type":"integer"},"answer":{"type":"string","maxLength":1000}}}}}}}}},"responses":{"200":{"description":"The page's questions"}}}},"/v1/pages/{id}/approve":{"post":{"description":"Needs a key with the read_act scope.","summary":"Approve a page waiting for you","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Page"}}}},"/v1/pages/{id}/reject":{"post":{"description":"Needs a key with the read_act scope.","summary":"Reject a page, saying what should change","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Page"}}}},"/v1/placements/{id}/confirm":{"post":{"description":"Needs a key with the read_act scope.","summary":"Confirm an offer (any payment is yours to make directly)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Placement"}}}},"/v1/placements/{id}/decline":{"post":{"description":"Needs a key with the read_act scope.","summary":"Decline an offer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Placement"}}}},"/v1/sites/{domain}/interview":{"get":{"summary":"Questions about your business, asked once; your answers are used in every page","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Interview"}}}},"/v1/sites/{domain}/interview/{key}":{"post":{"description":"Needs a key with the read_act scope.","summary":"Answer one interview question, or skip it","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","maxLength":1000},"skip":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Interview"}}}},"/v1/sites/{domain}/replies":{"get":{"summary":"Thread replies ready for you to post from your own account, and the last ten posted","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Replies"}}}},"/v1/sites/{domain}/replies/{id}/posted":{"post":{"description":"Needs a key with the read_act scope.","summary":"Say you posted a ready reply, from which Reddit account and where","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["handle"],"properties":{"handle":{"type":"string"},"link":{"type":"string"}}}}}},"responses":{"200":{"description":"Replies"}}}},"/v1/sites/{domain}/replies/{id}/skip":{"post":{"description":"Needs a key with the read_act scope.","summary":"Pass on a ready reply","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Replies"}}}},"/v1/replies/lookup":{"get":{"summary":"The ready reply for one thread, by its address, and why the given account may not post it","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}},{"name":"handle","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The reply, or null"}}}},"/v1/webhooks":{"get":{"summary":"Your webhooks","responses":{"200":{"description":"Webhooks"}}},"post":{"summary":"Add a webhook (https). Events: report.ready, page.awaiting_approval, page.live, placement.offer, correction.made. The signing secret is returned once.","responses":{"201":{"description":"Created"}}}},"/v1/webhooks/{id}/delete":{"post":{"summary":"Remove a webhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted"}}}}}}