API Documentation
Integrate SiteSupport.ai into your applications using our REST API.
Base URL
https://www.sitesupport.aiAuthentication
Public endpoints (chat, widget config) require no authentication. Dashboard endpoints require a session cookie (NextAuth). API key authentication is coming soon.
POST
/api/chatSend a message and get an AI response (SSE streaming).
Request Body
{
"siteId": "your-site-slug",
"message": "How do I reset my password?",
"visitorId": "visitor-123",
"conversationId": "optional-existing-id"
}Response
// SSE stream:
data: {"token":"You "}
data: {"token":"can "}
data: {"token":"reset..."}
data: {"done":true,"conversationId":"...","confidence":0.87,"sources":[...]}GET
/api/widget?siteId={siteId}Fetch widget configuration for a site (colors, greeting, position).
Response
{
"config": {
"botName": "AI Assistant",
"welcomeMessage": "Hi! How can I help?",
"primaryColor": "#6C3AED",
"position": "bottom-right"
}
}GET
/api/sitesAuth RequiredList all sites for the authenticated organization.
Response
{
"sites": [
{
"id": "uuid",
"domain": "https://example.com",
"siteId": "example-com-abc123",
"crawlStatus": "completed",
"pagesIndexed": 42
}
]
}POST
/api/sitesAuth RequiredAdd a new site and start crawling.
Request Body
{
"domain": "https://example.com",
"name": "My Website"
}Response
{
"site": { "id": "uuid", "siteId": "example-com-abc123", "crawlStatus": "crawling" }
}POST
/api/sites/{siteId}/crawlAuth RequiredTrigger a re-crawl of a site.
Response
{ "status": "crawling", "siteId": "example-com-abc123" }API Keys Coming Soon
We're working on API key authentication for programmatic access. In the meantime, use the dashboard or contact us for bulk operations.