Developer Docs
API Documentation
Connect AiMLText to your website, CRM, or application with our powerful RESTful API. Seamlessly integrate messaging capabilities into your existing workflows.
Getting Started
Authentication
All API requests require authentication using an API key. Include your key in the Authorization header:
Authorization: Bearer YOUR_API_KEYBase URL
All API requests should be made to:
https://api.aimltext.com/v1Core Endpoints
Send Message
POSTSend an SMS or WhatsApp message to a recipient
POST /messages/sendRequest Body:
{
"to": "+1234567890",
"message": "Hello from AiMLText!",
"channel": "sms", // or "whatsapp"
"from": "your_brand_id"
}Response:
{
"message_id": "msg_abc123",
"status": "sent",
"timestamp": "2025-01-17T12:00:00Z"
}Receive Messages (Webhook)
POSTConfigure a webhook URL to receive incoming messages in real-time
Webhook Payload:
{
"message_id": "msg_xyz789",
"from": "+1234567890",
"to": "your_brand_number",
"message": "Customer inquiry here",
"channel": "sms",
"timestamp": "2025-01-17T12:05:00Z"
}Get Conversation History
GETRetrieve message history for a conversation
GET /conversations/conversation_idResponse:
{
"conversation_id": "conv_123",
"messages": [
{
"message_id": "msg_001",
"from": "+1234567890",
"message": "Hello",
"timestamp": "2025-01-17T11:00:00Z"
}
]
}Live Chat Integration
WebSocketConnect your website's live chat directly to AiMLText for real-time messaging
wss://api.aimltext.com/v1/livechatExample Connection:
const ws = new WebSocket('wss://api.aimltext.com/v1/livechat');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'authenticate',
api_key: 'YOUR_API_KEY'
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('New message:', data);
};API Features
Real-Time Processing
Messages are processed instantly with sub-second latency for seamless customer experiences
Secure & Reliable
Enterprise-grade security with encrypted data transmission and 99.9% uptime SLA
Multi-Channel Support
Single API for SMS, WhatsApp, and live chat - manage all channels from one integration
Developer Friendly
Comprehensive documentation, SDKs for popular languages, and responsive developer support
Rate Limits
API requests are subject to the following rate limits based on your plan:
- Individual Plan: 100 requests/minute
- Team Plan: 500 requests/minute
- Multi-Brand Plan: 1,000 requests/minute
- Enterprise Plan: Custom limits available
Official SDKs
Node.js
npm install @aimltext/nodePython
pip install aimltextPHP
composer require aimltext/phpNeed Help?
Our developer support team is here to help you integrate AiMLText into your application. Contact us at api@aimltext.com