Amigo for Developers

Data vending API (MTN & Glo) — simple, fast, familiar.

Authenticate with a single token, send a JSON payload you already know, and get instant results. Airtel & 9mobile are marked as Coming soon.

cURL Preview
curl --location 'https://amigo.ng/api/data/' \
--header 'Authorization: Token YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "network": 1,
  "mobile_number": "09012345678",
  "plan": 1001,
  "Ported_number": true
}'
Familiar payload: network, mobile_number, plan, Ported_number.

Quickstart

  1. Get your API token from your Amigo dashboard.
  2. Pick a plan from the catalog below (MTN (id 1), Glo (id 2)).
  3. Send a POST to https://amigo.ng/api/data/ with headers:
    Authorization: Token <YOUR_API_TOKEN>, Content-Type: application/json.
Node / fetch
fetch('https://amigo.ng/api/data/', {
  method:'POST',
  headers:{
    'Authorization':'Token YOUR_API_TOKEN',
    'Content-Type':'application/json',
    // 'Idempotency-Key':'YOUR-UUID-OPTIONAL' // recommended
  },
  body:JSON.stringify({
    network: 1,
    mobile_number: '09012345678',
    plan: 1001,
    Ported_number: true
  })
}).then(r=>r.json()).then(console.log);
PHP (cURL)
<?php
$ch = curl_init('https://amigo.ng/api/data/');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Token YOUR_API_TOKEN',
    'Content-Type: application/json',
    // 'Idempotency-Key: YOUR-UUID-OPTIONAL'
  ],
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => json_encode([
    'network'=>1,
    'mobile_number'=>'09012345678',
    'plan'=>1001,
    'Ported_number'=>true
  ], JSON_UNESCAPED_UNICODE)
]);
$resp = curl_exec($ch);
http_response_code(curl_getinfo($ch, CURLINFO_RESPONSE_CODE));
curl_close($ch);
echo $resp;
Sandbox tip: send mobile_number starting with 090000 to simulate success without debiting.

Plan Catalog

Prices shown are computed as cost − agent_discount. Validity is in days.

MTN (network_id = 1)
MTN Plans
Plan IDCapacityValidityPrice (₦)
Glo (network_id = 2)
Glo Plans
Plan IDCapacityValidityPrice (₦)
Airtel (4), 9mobile (9)
Coming soon

API Reference

Base URL

https://amigo.ng/api

Authentication

Header: Authorization: Token <YOUR_API_TOKEN>. Manage tokens in your Amigo dashboard.

Purchase Data

POST /data/

Body (JSON):

{
  "network": 1,                // 1=MTN, 2=Glo
  "mobile_number": "09012345678",
  "plan": 1001,                // plan_id from the catalog
  "Ported_number": true       // true if the MSISDN is ported
}

Successful response (example):

{
  "success": true,
  "reference": "AMG-20250928203716-c40306",
  "message": "Dear Customer, You have successfully gifted 1GB data to 09012345678.",
  "network": 1,
  "plan": 1001,
  "amount_charged": 449,
  "status": "delivered"
}

Error response (examples):

{"success":false,"error":"invalid_token","message":"Your API token is not valid."}
{"success":false,"error":"plan_not_found","message":"Plan 1234 is not available on network 1."}
{"success":false,"error":"coming_soon","message":"Airtel is coming soon."}

Idempotency (recommended)

Send Idempotency-Key: <unique-uuid> to safely retry the same request.

Rate limits

Default: 1000 requests/minute (Can be upgraded on request).

© 2025 Amigo — Built with ❤️ in Nigeria