API Reference
Comprehensive documentation for the Ozibus Communication API. Send SMS, email, and verify phone numbers with our simple REST API.
Authentication
All API requests require authentication using your API key
POST
/v1/auth/token
Obtain an access token for API authentication
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key * | string | Yes | Your Ozibus API key |
Example Request
# Get authentication token
curl -X POST "https://api.ozibus.com/v1/auth/token" \
-H "Content-Type: application/json" \
-d '{"api_key": "your_api_key_here"}'
curl -X POST "https://api.ozibus.com/v1/auth/token" \
-H "Content-Type: application/json" \
-d '{"api_key": "your_api_key_here"}'
const response = await fetch('https://api.ozibus.com/v1/auth/token', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
api_key: 'your_api_key_here'
})
});
const data = await response.json();
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
api_key: 'your_api_key_here'
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.ozibus.com/v1/auth/token',
json={'api_key': 'your_api_key_here'}
)
data = response.json()
response = requests.post(
'https://api.ozibus.com/v1/auth/token',
json={'api_key': 'your_api_key_here'}
)
data = response.json()
Example Response
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 3600
}
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 3600
}
Send SMS
Send SMS messages to phone numbers worldwide
POST
/v1/sms/send
Send an SMS message to a single recipient
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| to * | string | Yes | Recipient phone number in E.164 format |
| message * | string | Yes | Text message content (max 1600 characters) |
| from | string | No | Sender ID or phone number (default: Ozibus) |
Example Request
curl -X POST "https://api.ozibus.com/v1/sms/send" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{"to": "+1234567890", "message": "Your verification code is 123456", "from": "Ozibus"}'
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{"to": "+1234567890", "message": "Your verification code is 123456", "from": "Ozibus"}'
const response = await fetch('https://api.ozibus.com/v1/sms/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_access_token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '+1234567890',
message: 'Your verification code is 123456',
from: 'Ozibus'
})
});
method: 'POST',
headers: {
'Authorization': 'Bearer your_access_token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '+1234567890',
message: 'Your verification code is 123456',
from: 'Ozibus'
})
});
Example Response
{
"message_id": "msg_123456789",
"status": "queued",
"to": "+1234567890",
"remaining_balance": 45.50
}
"message_id": "msg_123456789",
"status": "queued",
"to": "+1234567890",
"remaining_balance": 45.50
}