Base URL
All API requests are made to:Authentication
SiteGPT uses API keys for authentication. Include your API key in theAuthorization header of every request.
Getting your API key
- Sign in to your SiteGPT account
- Navigate to Billing or Profile > API Access
- Copy your API key
- Store it securely (never commit to version control)
Using your API key
Include your API key in theAuthorization header with the Bearer scheme:
Example request
Authentication errors
If your API key is missing, malformed, or invalid, you’ll receive a401 Unauthorized response:
Response format
All API responses use a consistent JSON structure:Success response
Error response
Error handling
HTTP status codes
HTTP status codes
- 200 OK - Request succeeded
- 400 Bad Request - Invalid request parameters or body
- 401 Unauthorized - Missing or invalid API key
- 403 Forbidden - Insufficient permissions
- 404 Not Found - Resource doesn’t exist
- 405 Method Not Allowed - HTTP method not supported
- 500 Internal Server Error - Server error
Common error codes
Common error codes
API_KEY_NOT_VALID- Invalid or missing API keyREQUEST_VALIDATION_FAILED- Request body validation failedCHATBOT_NOT_FOUND- Chatbot doesn’t existCHATBOT_FETCH_FORBIDDEN- No permission to access chatbotCHATBOT_LIMIT_REACHED- Exceeded chatbot quotaMESSAGES_LIMIT_REACHED- Exceeded message quota
Validation errors
When request validation fails, theerror.details array contains specific field errors:
Rate limiting
API requests are rate-limited to ensure platform stability:- Standard plans - 100 requests per minute
- Business plans - 500 requests per minute
- Enterprise plans - Custom limits
429 Too Many Requests response.
Pagination
List endpoints support pagination using query parameters:page- Page number (default: 1)limit- Results per page (default: 20, max: 100)
Making requests
Common workflows
Creating and configuring a chatbot
Creating and configuring a chatbot
1
Create chatbot
POST /v0/chatbots2
Update appearance
PATCH /v0/chatbots/{chatbotId}/appearance3
Add training content
POST /v0/chatbots/{chatbotId}/links4
Configure settings
PATCH /v0/chatbots/{chatbotId}/settings/general5
Add conversation starters
POST /v0/chatbots/{chatbotId}/quick-promptsSending messages
Sending messages
1
Create thread
POST /v0/chatbots/{chatbotId}/threads2
Send message
POST /v0/chatbots/{chatbotId}/message3
Fetch response
Included in send message response
4
Update reaction
PATCH /v0/chatbots/{chatbotId}/messages/{messageId}Managing conversations
Managing conversations
1
Fetch all threads
GET /v0/chatbots/{chatbotId}/threads2
Get thread details
GET /v0/chatbots/{chatbotId}/threads/{threadId}3
Escalate to agent
POST /v0/chatbots/{chatbotId}/threads/{threadId}/escalate4
Update thread
PATCH /v0/chatbots/{chatbotId}/threads/{threadId}API resources
The SiteGPT API provides endpoints for:- Chatbots - Create, read, update, delete chatbots
- Appearance - Customize chatbot visual design
- Content - Manage training data and custom responses
- Messages - Send and receive messages
- Threads - Manage conversation threads
- Settings - Configure chatbot behavior
- Prompts - Manage instructions and personas
- Quick Prompts - Conversation starters
- Follow-up Prompts - Post-response suggestions
- Icons - Upload custom icons
- Whitelabel - Manage white-label brands and users (enterprise)
Best practices
- Security
- Performance
- Error handling
- Data management
Never expose API keys - Keep them server-side only
Use environment variables - Don’t hardcode keys
Rotate keys regularly - Generate new keys periodically
Limit key scope - Use separate keys for different environments
Webhooks
Instead of polling the API, use webhooks to receive real-time updates:- New messages
- Lead captures
- Conversation escalations
- Custom events
SDKs and libraries
Official SDKs
Currently, SiteGPT doesn’t provide official SDKs. Use standard HTTP libraries in your language of choice.Community libraries
Check our community forum for user-contributed libraries and wrappers.Support
Need help with the API?- Documentation - Browse the API reference
- Email - support@sitegpt.ai
- Community - Join our Slack or forum
- Enterprise - Dedicated support for enterprise customers