All systems operational
API v2 — NexiSim infrastructure running normally
v2.0 live

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

1
Create your account Sign up on the NexiSim dashboard and top up your balance.
Go to nexisim.co.ke
2
Get your API key From your dashboard, navigate to the API section to generate a live key.
3
Make your first request Use the key as a Bearer token and call /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.

Need help integrating?
Our engineering team responds within a few hours.
support@nexisim.co.ke

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
.env
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.

GET/services
curl -X GET "https://www.nexisim.co.ke/api/v2/services" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
[
  { "id": 1, "name": "WhatsApp" },
  { "id": 2, "name": "Telegram" }
]

Get Countries

Returns available countries and pricing for a given service.

GET/countries/{service_id}
curl -X GET "https://www.nexisim.co.ke/api/v2/countries/1" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
[
  { "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.

POST/buy
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
}'
Success response
{
  "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.

GET/check-sms/{id}
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"
}
JavaScript — poll every 5s
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.

GET/orders
curl -X GET "https://www.nexisim.co.ke/api/v2/orders" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
[
  {
    "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.

Code Meaning
NO_NUMBERS No numbers available for that service/country right now.
BAD_SERVICE The service ID sent does not exist.
NO_BALANCE Account balance is too low to complete this purchase.
success Number activated and ready to receive SMS.

Reseller System

Buy at NexiSim rates, add your own markup, and resell to your customers.

Buy at cost  -->  Add markup  -->  Sell to customer  -->  Profit
Laravel example
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.ke
You will be taken to nexisim.co.ke to sign in or create an account.
Encrypted at rest
Regenerate anytime
Instant revocation
Usage analytics

How to use your key

Once you have your key, pass it as a Bearer token on every request.
curl -X GET "https://www.nexisim.co.ke/api/v2/services" \
-H "Authorization: Bearer YOUR_API_KEY"

Your webhook URL

Configure this from your NexiSim dashboard. Paste your endpoint below to test the format.
Configure on dashboard

Payload example

This is the exact JSON body we POST to your endpoint when an SMS is received.
{
  "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

php
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]);
});
Live logs are available in your NexiSim dashboard after signing in. View full logs
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
View live logs on dashboard