Developer API Documentation
Integrate our powerful communication APIs into your applications to enable SMS, voice, email, and more.
API Keys
To use our APIs, you'll need to generate API keys from your dashboard. Keep your API keys secure and never expose them in client-side code.
YOUR_API_KEY = "ai_mobile_telco_api_key_12345"
Getting Started
Our APIs are RESTful and return responses in JSON format. All API requests must be made over HTTPS and include your API key in the headers.
// Example API request using fetch
fetch('https://api.aimobiletelco.com/v1/sms/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
to: '+1234567890',
message: 'Hello from AI Mobile Telco!'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
API Documentation
SMS API
Send SMS messages to your customers with our reliable SMS API. Support for single messages and bulk sending.
Endpoint
POST https://api.aimobiletelco.com/v1/sms/send
Request Parameters
to
- Recipient phone number in E.164 formatmessage
- The SMS message contentfrom
(optional) - Sender ID or phone numbercallback_url
(optional) - URL for delivery status callbacks
Example Response
{
"success": true,
"message_id": "sms_123456789",
"status": "queued",
"segments": 1,
"credits_used": 1
}
SDKs & Libraries
We provide official SDKs for popular programming languages to make integration even easier.
JavaScript/Node.js
Our JavaScript SDK works in both browser and Node.js environments.
npm install aimobiletelco-sdk
Python
Simple and intuitive Python SDK for all our APIs.
pip install aimobiletelco-sdk
PHP
PHP SDK for easy integration with PHP applications.
composer require aimobiletelco/sdk
Webhooks
Receive real-time updates about message delivery, call status, and more through webhooks.
Setting Up Webhooks
Configure webhook URLs in your dashboard or specify them in your API requests. We'll send HTTP POST requests to your endpoints with event data.
Example Webhook Payload
{
"event_type": "sms.delivered",
"timestamp": "2023-04-15T14:32:21Z",
"message_id": "sms_123456789",
"to": "+1234567890",
"status": "delivered",
"delivered_at": "2023-04-15T14:32:20Z"
}
Webhook Events
sms.sent
- SMS message has been sentsms.delivered
- SMS message has been deliveredsms.failed
- SMS message failed to delivervoice.initiated
- Voice call has been initiatedvoice.answered
- Voice call has been answeredvoice.completed
- Voice call has been completedemail.sent
- Email has been sentemail.delivered
- Email has been deliveredemail.opened
- Email has been openedwhatsapp.sent
- WhatsApp message has been sentwhatsapp.delivered
- WhatsApp message has been deliveredwhatsapp.read
- WhatsApp message has been read
Need Help?
Our developer support team is here to help you with any questions or issues you may have.