API Documentation

Integrate SellAIBots into your applications with our REST API.

Contents

Authentication

All API requests require authentication using an API key. Include your key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from Settings → API Keys.

API Endpoints

Base URL: https://api.sellaibots.ai/v1

Bots

GET/botsList all bots
GET/bots/:idGet bot details
POST/botsCreate a new bot
PUT/bots/:idUpdate a bot
DELETE/bots/:idDelete a bot

Conversations

GET/conversationsList conversations
GET/conversations/:idGet conversation with messages

Leads

GET/leadsList captured leads
GET/leads/:idGet lead details

Analytics

GET/analytics/summaryGet analytics summary
GET/analytics/usageGet message usage stats

Rate Limits

PlanRequests/minMessages/month
Starter605,000
Professional12025,000
Scale300100,000

Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Code Examples

cURL

# List all bots
curl -X GET "https://api.sellaibots.ai/v1/bots" \
  -H "Authorization: Bearer YOUR_API_KEY"

JavaScript

const response = await fetch('https://api.sellaibots.ai/v1/bots', {
  headers: {
    'Authorization': `Bearer ${API_KEY}`
  }
});
const data = await response.json();

Python

import requests

response = requests.get(
  'https://api.sellaibots.ai/v1/bots',
  headers={'Authorization': f'Bearer {API_KEY}'}
)
data = response.json()

Error Handling

All errors follow a consistent format:

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired API key"
  }
}

Common error codes: