SMS API Documentation
Get started in no time with our easy integration. Tested and trusted by developers worldwide. Build with confidence with just a few lines of code.
Quick Start GuideQuick Start Guide
Getting Started
Welcome to the Big Famous SMS API documentation. Our API gives developers the ability to integrate text messaging functionality into existing apps and websites.
Prerequisites
- Active Big Famous account
- API key (available in dashboard)
- Basic programming knowledge
- HTTPS capable server
API Features
- Simple RESTful API
- JSON request/response format
- Unicode & emoji support
- Delivery status webhooks
- Bulk sending capabilities
- Real-time delivery reports
API Endpoint
https://api.bigfamous.com/sms/v1/send
Authentication
Include your API key in the request:
Authorization: Bearer YOUR_API_KEY
Keep your API key secure! Never expose it in client-side code.
Code Examples
Choose your preferred programming language and start sending SMS in minutes.
PHP Example
Send SMS with PHP
PHP// Initialize cURL
$url = 'https://api.bigfamous.com/sms/v1/send';
$data = [
'to' => '+1234567890',
'from' => 'BigFamous',
'message' => 'Hello from Big Famous SMS API!',
'unicode' => false
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer YOUR_API_KEY'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
// Handle response
if ($httpCode == 200) {
$result = json_decode($response, true);
echo "Message sent! ID: " . $result['message_id'];
} else {
echo "Error: " . $response;
}
Python Example
Send SMS with Python
Pythonimport requests
import json
# API Configuration
url = 'https://api.bigfamous.com/sms/v1/send'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
}
# SMS Data
data = {
'to': '+1234567890',
'from': 'BigFamous',
'message': 'Hello from Big Famous SMS API!',
'unicode': False
}
# Send Request
response = requests.post(url, headers=headers, data=json.dumps(data))
# Handle Response
if response.status_code == 200:
result = response.json()
print(f"Message sent! ID: {result['message_id']}")
else:
print(f"Error: {response.text}")
Node.js Example
Send SMS with Node.js
JavaScriptconst axios = require('axios');
// API Configuration
const url = 'https://api.bigfamous.com/sms/v1/send';
const headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
};
// SMS Data
const data = {
to: '+1234567890',
from: 'BigFamous',
message: 'Hello from Big Famous SMS API!',
unicode: false
};
// Send Request
axios.post(url, data, { headers })
.then(response => {
console.log(`Message sent! ID: ${response.data.message_id}`);
})
.catch(error => {
console.error('Error:', error.response ? error.response.data : error.message);
});
cURL Example
Send SMS with cURL
bashcurl -X POST https://api.bigfamous.com/sms/v1/send \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"to": "+1234567890",
"from": "BigFamous",
"message": "Hello from Big Famous SMS API!",
"unicode": false
}'
API Reference
POST /sms/v1/send
Send a single SMS message to one or multiple recipients.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string | Yes | Recipient phone number(s) in E.164 format |
from |
string | Yes | Sender ID (alphanumeric, max 11 characters) |
message |
string | Yes | Message content (max 1600 characters) |
unicode |
boolean | No | Enable unicode/special characters (default: false) |
schedule |
datetime | No | Schedule message for future delivery (ISO 8601) |
webhook_url |
string | No | URL for delivery status callbacks |
Response Format
Success Response (200 OK)
JSON{
"status": "success",
"message_id": "msg_abc123def456",
"to": "+1234567890",
"credits_used": 1,
"cost": 0.045
}
Error Codes
| Code | Status | Description |
|---|---|---|
400 |
Bad Request | Invalid parameters or missing required fields |
401 |
Unauthorized | Invalid or missing API key |
402 |
Payment Required | Insufficient credits |
429 |
Too Many Requests | Rate limit exceeded |
500 |
Internal Server Error | Server error, please retry |
Ready to Start Building?
Sign up for a free account and get 100 SMS credits to test our API. No credit card required.