SiteGist API v1
Send messages to your chatbots, list bots, conversations, leads, and knowledge sources programmatically. REST over HTTPS, JSON in and out. All read endpoints are owner-only — the API key must belong to the chatbot owner.
Base URL
https://www.sitegist.co/api/v1
Authentication
Create a key in the dashboard under Profile → API keys, then send it as a Bearer token on every request. Keys look like sk_live_… — keep them secret.
curl https://www.sitegist.co/api/v1/chatbots \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Rate limits
120 requests/minute per API key. Exceeding it returns 429 with a Retry-After header.
Endpoints
/chatSend a message and get the AI answer (also persists the conversation).
Request body
{
"chatbotId": "proj_abc123", // required — the chatbot/project id
"message": "What are your pricing plans?", // required
"sessionId": "sess_xyz" // optional — continue an existing conversation
}Example
curl -X POST https://www.sitegist.co/api/v1/chat \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"chatbotId":"proj_abc123","message":"Hello"}'Response
{
"sessionId": "sess_xyz",
"answer": "Our plans are Free, Pro ($19/mo) and Enterprise…"
}/chatbotsList the chatbots owned by the API key. Owner-only.
Response
{
"data": [
{ "id": "proj_abc123", "name": "Support Bot", "status": "ACTIVE", "createdAt": "2026-06-01T10:00:00.000Z" }
]
}/conversations?chatbotId=proj_abc123List recent conversations (latest 100). chatbotId is optional. Owner-only.
Response
{
"data": [
{
"id": "sess_xyz",
"chatbotId": "proj_abc123",
"customerEmail": "jane@example.com",
"status": "active",
"mode": "ai",
"messageCount": 6,
"createdAt": "2026-06-20T09:00:00.000Z",
"updatedAt": "2026-06-20T09:05:00.000Z"
}
]
}/conversations/:id/messagesList messages for a conversation (oldest first, capped at 500). Owner-only.
Example
curl https://www.sitegist.co/api/v1/conversations/sess_xyz/messages \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Response
{
"data": [
{
"id": "msg_abc",
"role": "user",
"content": "What are your pricing plans?",
"createdAt": "2026-06-20T09:00:01.000Z"
},
{
"id": "msg_def",
"role": "assistant",
"content": "Our plans are Free, Pro ($19/mo) and Enterprise…",
"createdAt": "2026-06-20T09:00:03.000Z"
}
]
}/leads?chatbotId=proj_abc123List leads for a chatbot (latest 100). chatbotId is required. Owner-only.
Example
curl "https://www.sitegist.co/api/v1/leads?chatbotId=proj_abc123" \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Response
{
"data": [
{
"id": "lead_abc",
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+1-555-0100",
"company": "Acme Inc",
"status": "new",
"createdAt": "2026-06-20T09:10:00.000Z"
}
]
}/sources?chatbotId=proj_abc123List knowledge sources for a chatbot (latest 100, no full content). chatbotId is required. Owner-only.
Example
curl "https://www.sitegist.co/api/v1/sources?chatbotId=proj_abc123" \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Response
{
"data": [
{
"id": "src_abc",
"type": "web",
"source": "https://example.com/docs",
"title": "Product docs",
"status": "indexed",
"lastIndexedAt": "2026-06-18T12:00:00.000Z"
}
]
}Errors
Errors return a JSON body with an error message and an appropriate status code.
{ "error": "chatbotId and message are required." }400Missing/invalid parameters401Missing, invalid, or revoked API key404Chatbot not found / not yours429Rate limit exceeded (see Retry-After)502Answer generation failed