Sites
A “site” is a project that hosts a chatbot widget. Each site has a site_key (used to embed the widget) and a domain that can be DNS-verified. All endpoints require authentication.
GET
/api/v1/sites AuthList your sites.
Response
{ "success": true, "sites": [ { "id": 1, "name": "Acme", "domain": "acme.com", "site_key": "sk_…", "is_active": true } ] }POST
/api/v1/sites AuthAdd a site. url is required; the domain is derived from it. Plan-limited.
Request body
{ "url": "https://acme.com", "name": "Acme" }Response
{ "success": true, "site": { "id": 1, "site_key": "sk_…" } }GET
/api/v1/sites/{id} AuthGet a single site.
Response
{ "success": true, "site": { … } }PUT
/api/v1/sites/{id} AuthUpdate site name or URL.
Request body
{ "name": "Acme Inc" }Response
{ "success": true, "site": { … } }DELETE
/api/v1/sites/{id} AuthDelete the site and all related data.
Response
{ "success": true, "message": "Site deleted" }POST
/api/v1/sites/{id}/verify AuthVerify domain ownership via DNS TXT record.
Response
{ "success": true, "verified": true }