Integrate JelyTech chatbot capabilities into your applications programmatically
API access is available exclusively for Pro and Enterprise plan customers. To get started with the API, upgrade your plan and generate your API key from the dashboard.
View Pricing Plans⚠️ Important: Keep your API key secure. Never expose it in client-side code or public repositories.
All API requests should be made to:
https://api.jelytech.com/v1
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
/chat/send
Send a message to your chatbot and receive a response.
{ "botId": "your-bot-id", "message": "What are your business hours?", "conversationId": "optional-conversation-id", "userId": "optional-user-id", "metadata": { "source": "website", "userAgent": "Mozilla/5.0..." } }
{ "success": true, "response": "We're open Monday through Friday, 9 AM to 5 PM EST.", "conversationId": "conv_123456", "messageId": "msg_789012", "timestamp": "2025-01-10T14:30:00Z" }
curl -X POST https://api.jelytech.com/v1/chat/send \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "botId": "bot_abc123", "message": "What are your business hours?" }'
/chat/history/:conversationId
Retrieve the full conversation history for a specific conversation.
conversationId
- The unique conversation identifier{ "success": true, "conversationId": "conv_123456", "messages": [ { "id": "msg_001", "role": "user", "content": "What are your business hours?", "timestamp": "2025-01-10T14:30:00Z" }, { "id": "msg_002", "role": "assistant", "content": "We're open Monday through Friday...", "timestamp": "2025-01-10T14:30:05Z" } ] }
/bots
Create a new chatbot programmatically.
{ "name": "Customer Support Bot", "description": "Handles customer inquiries", "configuration": { "greeting": "Hello! How can I help you today?", "theme": { "primaryColor": "#007bff", "position": "bottom-right" } } }
{ "success": true, "bot": { "id": "bot_xyz789", "name": "Customer Support Bot", "status": "active", "createdAt": "2025-01-10T14:30:00Z" } }
/bots/:botId/train
Upload training documents to your chatbot.
Content-Type: multipart/form-data file: [document.pdf] metadata: { "title": "Product Documentation", "category": "support" }
curl -X POST https://api.jelytech.com/v1/bots/bot_abc123/train \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf" \ -F 'metadata={"title":"Product Documentation"}'
/bots/:botId/analytics
Retrieve analytics data for your chatbot.
startDate
- Start date (ISO 8601 format)endDate
- End date (ISO 8601 format)metrics
- Comma-separated list of metrics (messages, users, satisfaction){ "success": true, "analytics": { "totalMessages": 1250, "uniqueUsers": 423, "averageSatisfaction": 4.5, "responseTime": "1.2s", "topQuestions": [ "What are your business hours?", "How do I reset my password?" ] } }
All API responses include a success
field. When an error occurs:
{ "success": false, "error": { "code": "INVALID_API_KEY", "message": "The provided API key is invalid or expired", "statusCode": 401 } }
Code | Status | Description |
---|---|---|
INVALID_API_KEY | 401 | API key is invalid or expired |
RATE_LIMIT_EXCEEDED | 429 | Too many requests in a short period |
BOT_NOT_FOUND | 404 | The specified bot ID does not exist |
QUOTA_EXCEEDED | 403 | Monthly message quota exceeded |
INVALID_REQUEST | 400 | Request body is malformed or missing required fields |
API rate limits vary by plan:
Rate limit information is included in response headers:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 950 X-RateLimit-Reset: 1641820800
Configure webhooks to receive real-time notifications about chatbot events.
message.received
- New message from usermessage.sent
- Bot response sentconversation.started
- New conversation initiatedconversation.ended
- Conversation closedquota.warning
- Approaching message quota{ "event": "message.received", "timestamp": "2025-01-10T14:30:00Z", "data": { "botId": "bot_abc123", "conversationId": "conv_123456", "message": { "id": "msg_789012", "content": "What are your business hours?", "userId": "user_456789" } } }
Official SDKs are available for popular programming languages:
npm install @jelytech/node-sdk
pip install jelytech
composer require jelytech/php-sdk
gem install jelytech
const JelyTech = require('@jelytech/node-sdk'); const client = new JelyTech({ apiKey: 'YOUR_API_KEY' }); async function sendMessage() { const response = await client.chat.send({ botId: 'bot_abc123', message: 'What are your business hours?' }); console.log(response.data.response); } sendMessage();
success
field and handle errors gracefully.Our support team is here to help you with API integration.