← Back to Docs
Sites API
Create and manage sites. All endpoints require an API key or session, except the public config endpoint.
GET
/sitesExample response
{
"sites": [{
"id": "site_abc123",
"name": "My Blog",
"url": "https://myblog.com",
"comment_count": 1247,
"page_count": 89,
"moderation_level": "post_with_filter",
"created_at": "2024-11-01T00:00:00Z"
}],
"limits": {
"plan": "pro",
"maxSites": 10,
"currentSites": 1,
"canCreateMore": true
}
}POST
/sites// Request body
{ "name": "My New Site", "url": "https://newsite.com", "moderation_level": "post_with_filter" }
// Response: 201 Created
{ "id": "site_new456", "name": "My New Site", "created_at": "2025-01-15T12:00:00Z" }
// 409 Conflict if URL exists or site limit reachedGET
/sites/:siteIdDetailed info including current usage against plan limits.
Example response
{
"id": "site_abc123",
"name": "My Blog",
"domain": "myblog.com",
"plan": "pro",
"theme": {
"primaryColor": "#6170f0",
"mode": "auto",
"layout": "premium"
},
"webhook_url": "https://your-server.com/webhooks/threadline",
"guest_commenting_enabled": true,
"total_comments": 1247,
"created_at": "2024-11-01T00:00:00Z"
}PATCH
/sites/:siteId{ "name": "Renamed", "moderation_level": "pre_approval", "word_filter": ["spam*"] }
// moderation_level: "open", "post_with_filter", "pre_approval"Example response
{
"id": "site_abc123",
"name": "Renamed",
"domain": "myblog.com",
"theme": {
"primaryColor": "#6170f0",
"mode": "auto",
"layout": "premium"
},
"updated_at": "2025-01-15T12:30:00Z"
}GET
/api/sites/config/{apiKey}PUBLICPublic embed configuration used by the widget. Returns theme, feature flags, and optional usage_warning.
Example response
{
"id": "site_abc123",
"name": "My Blog",
"domain": "myblog.com",
"plan": "pro",
"theme": {
"primaryColor": "#6170f0",
"mode": "auto",
"layout": "premium",
"shell": "disqus"
},
"features": {
"removeBranding": false,
"customTheme": true,
"layoutPicker": true,
"staffModeration": true,
"sso": false,
"analytics": true
},
"usage_warning": null,
"guest_commenting_enabled": true,
"locked": false,
"writable": true
}DELETE
/sites/:siteIdPermanently deletes the site and all comments. Requires header X-Confirm-Delete: true. Returns 204.
Destructive: This action is irreversible.