API Documentation

Integrate Chatorex programmatically with our REST API. Send messages, manage sources, retrieve leads, and configure your widget.

Available on Growth plan and above. View plans →

Base URL

https://your-domain.com/api

Authentication

Authorization: Bearer YOUR_API_KEY

Authentication

All API requests require a Bearer token. You can generate API keys from your dashboard under Settings > API Keys. Include your key in the Authorization header of every request.

curl https://your-domain.com/api/sources \
  -H "Authorization: Bearer sk_live_your_api_key_here"

Rate Limits

API requests are rate-limited based on your plan. Growth plans allow up to 60 requests per minute. Scale and Enterprise plans have higher limits. If you exceed the rate limit, you will receive a 429 Too Many Requests response. Contact us if you need higher limits.

Endpoints

POST/api/chat

Send a message to your chatbot and receive an AI-generated response.

curl -X POST https://your-domain.com/api/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "How do I reset my password?",
    "chatbot_id": "your-chatbot-id",
    "session_id": "optional-session-id"
  }'
GET/api/sources

List all content sources (URLs, files, text) in your chatbot's knowledge base.

curl https://your-domain.com/api/sources \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/sources

Add a new content source to your chatbot's knowledge base.

curl -X POST https://your-domain.com/api/sources \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "url",
    "url": "https://example.com/help",
    "chatbot_id": "your-chatbot-id"
  }'
DELETE/api/sources

Remove a content source from your chatbot's knowledge base.

curl -X DELETE https://your-domain.com/api/sources?id=source-id \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/leads

Retrieve all captured leads with contact information and conversation context.

curl https://your-domain.com/api/leads \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/widget-config

Get the current widget configuration including appearance settings and quick prompts.

curl https://your-domain.com/api/widget-config \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/widget-settings

Retrieve detailed widget settings including colors, position, welcome message, and behavior.

curl https://your-domain.com/api/widget-settings \
  -H "Authorization: Bearer YOUR_API_KEY"
PUT/api/widget-settings

Update widget settings such as colors, welcome message, position, and lead capture configuration.

curl -X PUT https://your-domain.com/api/widget-settings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "primary_color": "#4F46E5",
    "welcome_message": "Hi! How can I help?",
    "position": "bottom-right"
  }'

Need Help with the API?

If you have questions about the API, need help with integration, or want to request a new endpoint, get in touch.

Ready to Build with Chatorex?

Get your API key and start integrating AI-powered customer support into your applications.

API access available on Growth plan and above.