SMS Providers
Configure SMS providers to enable SMS sending through MessagePipe with automatic failover support.
Supported SMS Providers
Twilio
Configuration:
{
"accountSid": "ACxxxxxxxxxxxxx",
"authToken": "your-auth-token",
"fromNumber": "+1234567890"
}
Termii
Configuration:
{
"apiKey": "your-termii-api-key",
"senderId": "YourApp"
}
Amazon SNS
Configuration:
{
"accessKeyId": "your-aws-access-key",
"secretAccessKey": "your-aws-secret-key",
"region": "us-east-1"
}
Adding SMS Providers
Add a new SMS provider to your project:
POST /sms-config/providers?projectId={projectId}
Content-Type: application/json
Authorization: Bearer {your-jwt-token}
{
"provider": "twilio",
"name": "Primary Twilio",
"enabled": true,
"priority": 1,
"config": {
"accountSid": "ACxxxxxxxxxxxxx",
"authToken": "your-auth-token",
"fromNumber": "+1234567890"
}
}
Response:
{
"id": "sms-provider-uuid",
"provider": "twilio",
"name": "Primary Twilio",
"enabled": true,
"priority": 1,
"createdAt": "2024-01-01T10:00:00Z"
}
Managing SMS Providers
Get All SMS Providers
GET /sms-config/providers?projectId={projectId}
Authorization: Bearer {your-jwt-token}
Update SMS Provider
PUT /sms-config/providers/{providerConfigId}
Content-Type: application/json
Authorization: Bearer {your-jwt-token}
{
"name": "Updated Twilio Config",
"enabled": true,
"priority": 1,
"config": {
"accountSid": "ACxxxxxxxxxxxxx",
"authToken": "updated-auth-token",
"fromNumber": "+1234567890"
}
}
Delete SMS Provider
DELETE /sms-config/providers/{providerConfigId}
Authorization: Bearer {your-jwt-token}
SMS Configuration
Before adding providers, create an SMS configuration for your project:
POST /sms-config?projectId={projectId}
Content-Type: application/json
Authorization: Bearer {your-jwt-token}
{
"senderName": "YourAppName",
"enabled": true
}
Get SMS Configuration
GET /sms-config?projectId={projectId}
Authorization: Bearer {your-jwt-token}
Update SMS Configuration
PUT /sms-config?projectId={projectId}
Content-Type: application/json
Authorization: Bearer {your-jwt-token}
{
"senderName": "UpdatedAppName",
"enabled": true
}
Regional Considerations
Twilio
- Global coverage with local phone numbers
- Supports long codes and short codes
- Advanced features like delivery receipts
Termii
- Optimized for African markets
- Better delivery rates in Nigeria, Ghana, Kenya
- Local compliance and regulations handled
Amazon SNS
- Global AWS infrastructure
- Integration with other AWS services
- Pay-per-message pricing
Provider Priority Setup
Example priority configuration:
- Twilio (Priority 1) - Primary for global reach
- Termii (Priority 2) - Secondary for African markets
- Amazon SNS (Priority 3) - Fallback option