// api documentation
Developer API Reference
Complete REST API reference for all Hadronsoft communication channels. Authentication, SMS, WhatsApp, RCS, Voice, IVR. Code samples in 8 languages. Postman collection included.
Quick Start
Get your first message sent in under 5 minutes
Authentication
API keys, JWT tokens, and secure access management
| Method | Endpoint | Description |
|---|---|---|
| POST | //auth/api-key | Generate new API key |
| GET | //auth/api-keys | List all API keys |
| DELETE | //auth/api-key/{id} | Revoke API key |
| POST | //auth/verify | Verify API key validity |
Code Example
Node.jsPythonPHPJavaGoC#/.NETRubyPostman
curl -X POST https://api.hadronsoft.com/v1/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+910000000000",
"message": "Your OTP is 123456",
"route": "transactional",
"sender_id": "HDSIND-T"
}'Webhooks
Real-time event notifications for all channels
| Event | Description | Channels |
|---|---|---|
| sms.sent | SMS submitted for delivery | SMS |
| sms.delivered | SMS delivered to handset | SMS |
| sms.failed | SMS delivery failed | SMS |
| sms.otp.verified | OTP verified successfully | SMS |
| whatsapp.sent | WhatsApp message sent | WhatsApp |
| whatsapp.delivered | WhatsApp message delivered | WhatsApp |
| whatsapp.read | WhatsApp message read | WhatsApp |
| whatsapp.failed | WhatsApp message failed | WhatsApp |
| rcs.sent | RCS message sent | RCS |
| rcs.delivered | RCS message delivered | RCS |
| rcs.read | RCS message read | RCS |
| voice.initiated | Voice call initiated | Voice |
| voice.ringing | Call ringing | Voice |
| voice.answered | Call answered | Voice |
| voice.completed | Call completed | Voice |
| voice.failed | Call failed | Voice |
| ivr.incoming | Incoming IVR call | IVR |
| ivr.dtmf | DTMF input received | IVR |
| wallet.low | Wallet balance low | All |
| wallet.credited | Wallet credited | All |
Webhook Handler Example
// Webhook endpoint example (Node.js/Express)
app.post('/webhook/hadronsoft', express.json(), (req, res) => {
const { event, data } = req.body;
switch(event) {
case 'sms.delivered':
console.log('SMS delivered:', data.message_id);
break;
case 'whatsapp.read':
console.log('WhatsApp read:', data.conversation_id);
break;
case 'voice.completed':
console.log('Call completed:', data.call_id, data.duration);
break;
}
res.status(200).send('OK');
});SDKs & Libraries
Official and community-maintained libraries for rapid integration
Node.js
npm install @hadronsoft/sdkPython
pip install hadronsoft-sdkPHP
composer require hadronsoft/sdkJava
Maven/Gradle dependencyGo
go get github.com/hadronsoft/go-sdkC#/.NET
dotnet add package Hadronsoft.SDKRuby
gem install hadronsoftPostman
Import collection from dashboardError Codes
Standard HTTP status codes and Hadronsoft-specific error handling
| Code | Message | Resolution |
|---|---|---|
| 400 | Bad Request - Invalid parameters | Check request body and required fields |
| 401 | Unauthorized - Invalid API key | Verify API key in Authorization header |
| 403 | Forbidden - Insufficient permissions | Check API key scopes and plan limits |
| 404 | Not Found - Resource does not exist | Verify endpoint URL and resource ID |
| 422 | Unprocessable Entity - Validation failed | Review field validation errors in response |
| 429 | Too Many Requests - Rate limit exceeded | Implement exponential backoff |
| 500 | Internal Server Error | Retry with exponential backoff, contact support if persists |
| 503 | Service Unavailable - Maintenance | Check status page, retry after maintenance window |
Rate Limits
Per-second limits by plan tier. Headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
| Plan Tier | SMS | RCS | Voice | IVR | |
|---|---|---|---|---|---|
| Free / Starter | 100/sec | 50/sec | 30/sec | 10/sec | 20/sec |
| Growth | 500/sec | 200/sec | 100/sec | 50/sec | 50/sec |
| Pro | 1000/sec | 500/sec | 200/sec | 100/sec | 100/sec |
| Enterprise | Custom | Custom | Custom | Custom | Custom |
Ready to Integrate?
Get your API key, import the Postman collection, and send your first message in minutes.

