Build with
NexiSim API
Virtual numbers, SMS OTP verification, and a full reseller layer — everything you need to integrate phone verification into your own product.
Build with NexiSim
Integrate virtual numbers, SMS OTP, and reseller capabilities into your product using our REST API.
Documentation
Full REST API reference with examples.
API Keys
Generate and manage your credentials.
Webhooks
Get real-time SMS delivery events.
Request Logs
Monitor all API activity in real time.
Get started in 3 steps
/services to fetch available apps.
Quick example — fetch services
curl -X GET "https://www.nexisim.co.ke/api/v2/services" \ -H "Authorization: Bearer YOUR_API_KEY"
Replace YOUR_API_KEY with the key from your dashboard.
See the for all endpoints.
NexiSim API Reference
Virtual numbers, SMS OTP, and a full reseller layer — everything you need to build on NexiSim.
Base URL
All requests are relative to this endpoint.
https://www.nexisim.co.ke/api/v2
Authentication
Pass your API key as a Bearer token on every request. Get your key from your NexiSim dashboard.
Authorization: Bearer YOUR_API_KEY
NEXISIM_API_KEY=your_api_key NEXISIM_BASE_URL=https://www.nexisim.co.ke/api/v2
Get Services
Returns all apps/services you can purchase a number for.
curl -X GET "https://www.nexisim.co.ke/api/v2/services" \ -H "Authorization: Bearer YOUR_API_KEY"
[
{ "id": 1, "name": "WhatsApp" },
{ "id": 2, "name": "Telegram" }
]
Get Countries
Returns available countries and pricing for a given service.
curl -X GET "https://www.nexisim.co.ke/api/v2/countries/1" \ -H "Authorization: Bearer YOUR_API_KEY"
[
{ "id": 1, "name": "Kenya", "price": 10 },
{ "id": 2, "name": "Nigeria", "price": 12 }
]
Buy Number
Purchases a virtual number and starts an activation for the given service and country.
curl -X POST "https://www.nexisim.co.ke/api/v2/buy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"country_id": 2
}'
{
"status": "success",
"activation_id": 91231,
"phone_number": "+254712345678",
"cost": 10
}
Check SMS
Poll this endpoint to see if an OTP has arrived for a given activation.
curl -X GET "https://www.nexisim.co.ke/api/v2/check-sms/91231" \ -H "Authorization: Bearer YOUR_API_KEY"
{ "status": "active", "sms": null }
{
"status": "sms_received",
"sms": "Your OTP is 123456"
}
setInterval(() => {
fetch('https://www.nexisim.co.ke/api/v2/check-sms/91231', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
})
.then(r => r.json())
.then(data => {
if (data.sms) console.log('OTP:', data.sms);
});
}, 5000);
Orders
Returns your recent orders and their status.
curl -X GET "https://www.nexisim.co.ke/api/v2/orders" \ -H "Authorization: Bearer YOUR_API_KEY"
[
{
"id": 1,
"service": "WhatsApp",
"country": "Kenya",
"status": "active",
"phone_number": "+254712345678"
}
]
Error Responses
All errors follow the same shape: an error field and a human-readable message.
Reseller System
Buy at NexiSim rates, add your own markup, and resell to your customers.
Buy at cost --> Add markup --> Sell to customer --> Profit
use Illuminate\Support\Facades\Http;
public function resell($service_id, $country_id, $markup = 5)
{
$res = Http::withHeaders([
'Authorization' => 'Bearer '.env('NEXISIM_API_KEY'),
])->post(env('NEXISIM_BASE_URL').'/buy', [
'service_id' => $service_id,
'country_id' => $country_id,
]);
$data = $res->json();
return [
'phone_number' => $data['phone_number'] ?? null,
'activation_id' => $data['activation_id'] ?? null,
'cost' => ($data['cost'] ?? 0) + $markup,
'profit' => $markup,
];
}
- API v2 fully structured
- Reseller system ready
- SMS OTP integration
- Real-time polling
- Multi-country support
- Production SaaS architecture
Get your API Key
Your live API key lives securely inside your NexiSim account. Log in to your dashboard to generate, view, or regenerate it.
Go to nexisim.co.keHow to use your key
curl -X GET "https://www.nexisim.co.ke/api/v2/services" \ -H "Authorization: Bearer YOUR_API_KEY"
Webhook Configuration
Get instant POST notifications to your server the moment an SMS arrives — no polling needed.
Your webhook URL
Payload example
{
"event": "sms_received",
"activation_id": 91231,
"phone_number": "+254712345678",
"sms": "Your OTP is 123456",
"received_at": "2025-01-15T10:30:00Z"
}
Laravel webhook receiver example
Route::post('/webhooks/nexisim', function (Request $request) {
$event = $request->input('event');
$sms = $request->input('sms');
$phone = $request->input('phone_number');
$id = $request->input('activation_id');
if ($event === 'sms_received') {
// Process the OTP...
Log::info("OTP {$sms} received on {$phone} (activation #{$id})");
}
return response()->json(['ok' => true]);
});
API Request Logs
A running history of all requests made with your API key. Available inside your NexiSim dashboard.
| Endpoint | Method | Status | When |
|---|---|---|---|
| /services | GET | 200 | 2 min ago |
| /buy | POST | 200 | 18 min ago |
| /check-sms/91231 | GET | 200 | 18 min ago |
| /buy | POST | 402 | 1 hour ago |
| /orders | GET | 200 | 3 hours ago |