Amigo Developer Platform

Build data into your product.

Use Amigo APIs to vend data through your app, website, terminal or internal tool. Start with a developer account, generate an API token, then send clean JSON requests.

Token auth

Generate API tokens from settings and authenticate with `X-API-Key`.

IP whitelist

Lock API usage to trusted servers when you are ready for production.

Idempotency

Use unique keys to retry safely without accidental duplicate charges.

Live catalog

Fetch available plans and plan reliability before you route traffic.

Quickstart.

Create an Amigo account, upgrade to developer in settings, generate a token, then call the data endpoint from your server.

1. Get your token

Open API settings after login. If you are not a developer yet, tap upgrade and generate your first token.

2. Send a purchase request

Use the plan ID from the live catalog. Send requests from your backend, not from public frontend JavaScript.

POST https://amigo.ng/api/data/
JavaScript
fetch('https://amigo.ng/api/data/', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_TOKEN',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID()
  },
  body: JSON.stringify({
    network: 1,
    mobile_number: '09012345678',
    plan: 1001,
    Ported_number: true
  })
}).then(r => r.json()).then(console.log);
PHP
<?php
$ch = curl_init('https://amigo.ng/api/data/');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => [
    'X-API-Key: YOUR_API_TOKEN',
    'Content-Type: application/json',
    'Idempotency-Key: '.bin2hex(random_bytes(16))
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'network' => 1,
    'mobile_number' => '09012345678',
    'plan' => 1001,
    'Ported_number' => true
  ])
]);
echo curl_exec($ch);
curl_close($ch);
Authentication tip: `X-API-Key` is recommended. `Authorization: Token YOUR_API_TOKEN` and `Authorization: Bearer YOUR_API_TOKEN` are also supported when your server forwards the Authorization header to PHP.

Live plan catalog.

These tables load from the same plan APIs your integration can use.

MTN (network 1)
MTN Plans
Plan IDCapacityValidityPrice
Glo (network 2)
Glo Plans
Plan IDCapacityValidityPrice
Airtel (network 4)
Airtel Plans
Plan IDCapacityValidityPrice

Plan efficiency.

Use reliability data to pick plans that are safer for production traffic.

MTN
MTN Efficiency
Plan IDCapacityEfficiency
Glo
Glo Efficiency
Plan IDCapacityEfficiency
Airtel
Airtel Efficiency
Plan IDCapacityEfficiency

Reference.

The important parts of the API in one place.

BASEhttps://amigo.ng/api

All production API calls are served from this base URL.

POST/data/
{
  "network": 1,
  "mobile_number": "09012345678",
  "plan": 1001,
  "Ported_number": true
}
AUTHX-API-Key: YOUR_API_TOKEN

Generate and revoke tokens from API settings after logging in.

SAFE RETRYIdempotency-Key

Send a unique value per intended purchase so retries do not duplicate successful charges.