Complete reference documentation for the OVO Communications API.
The SMS API allows you to send and receive SMS messages globally. It provides a simple and reliable way to integrate SMS messaging into your applications.
All API requests should be made to the following base URL:
https://api.ovocommunications.com/v1
All API requests require authentication using your API key. You can include your API key in the request headers as follows:
Authorization: Bearer YOUR_API_KEY
Note: Keep your API key secure and never expose it in client-side code.
The SMS API provides the following endpoints:
Send a single SMS message to a recipient.
Parameter | Type | Required | Description |
---|---|---|---|
to | string | Yes | The recipient's phone number in E.164 format (e.g., +1234567890) |
from | string | Yes | The sender ID or phone number |
message | string | Yes | The content of the SMS message |
callback_url | string | No | URL to receive delivery status updates |
{
"message_id": "sm_1a2b3c4d5e6f7g8h9i0j",
"status": "queued",
"to": "+1234567890",
"from": "OVO",
"created_at": "2025-05-17T12:34:56Z"
}
Send SMS messages to multiple recipients in a single request.
Parameter | Type | Required | Description |
---|---|---|---|
messages | array | Yes | Array of message objects |
callback_url | string | No | URL to receive delivery status updates |
{
"batch_id": "batch_1a2b3c4d5e6f7g8h9i0j",
"total_messages": 3,
"successful": 3,
"failed": 0,
"messages": [
{
"message_id": "sm_1a2b3c4d5e6f7g8h9i0j",
"status": "queued",
"to": "+1234567890",
"from": "OVO"
},
{
"message_id": "sm_2b3c4d5e6f7g8h9i0j1k",
"status": "queued",
"to": "+2345678901",
"from": "OVO"
},
{
"message_id": "sm_3c4d5e6f7g8h9i0j1k2l",
"status": "queued",
"to": "+3456789012",
"from": "OVO"
}
],
"created_at": "2025-05-17T12:34:56Z"
}
Retrieve information about a specific SMS message.
Parameter | Type | Required | Description |
---|---|---|---|
message_id | string | Yes | The ID of the SMS message |
{
"message_id": "sm_1a2b3c4d5e6f7g8h9i0j",
"status": "delivered",
"to": "+1234567890",
"from": "OVO",
"message": "Hello from OVO Communications!",
"segments": 1,
"created_at": "2025-05-17T12:34:56Z",
"updated_at": "2025-05-17T12:35:10Z",
"delivered_at": "2025-05-17T12:35:10Z"
}
Here are some examples of how to use the SMS API with different programming languages:
import requests
import json
url = "https://api.ovocommunications.com/v1/sms/send"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"to": "+1234567890",
"from": "OVO",
"message": "Hello from OVO Communications!"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
const axios = require('axios');
const url = 'https://api.ovocommunications.com/v1/sms/send';
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
};
const data = {
to: '+1234567890',
from: 'OVO',
message: 'Hello from OVO Communications!'
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
// Using cURL
$url = 'https://api.ovocommunications.com/v1/sms/send';
$data = json_encode([
'to' => '+1234567890',
'from' => 'OVO',
'message' => 'Hello from OVO Communications!'
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
'Content-Length: ' . strlen($data)
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
The API uses standard HTTP response codes to indicate the success or failure of an API request. In general:
Error responses include a JSON object with details about the error:
{
"error": {
"code": "invalid_parameter",
"message": "The 'to' parameter must be a valid phone number in E.164 format.",
"param": "to",
"request_id": "req_1a2b3c4d5e6f7g8h9i0j"
}
}