Authenticate with an API key, send a JSON payload you already know, and get instant results. Airtel & 9mobile are marked as Coming soon.
curl --location 'https://amigo.ng/api/data/' \
--header 'X-API-Key: YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"network": 1,
"mobile_number": "09012345678",
"plan": 1001,
"Ported_number": true
}'
https://amigo.ng/api/data/ with headers:X-API-Key: <YOUR_API_TOKEN>, Content-Type: application/json.Authorization: Token <TOKEN> (or Bearer). If your server strips the Authorization header (common on Apache), either use X-API-Key as above, or add:
# .htaccess or vhost
SetEnvIfNoCase Authorization "^(.*)" HTTP_AUTHORIZATION=$1
# or
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%1]
fetch('https://amigo.ng/api/data/', {
method:'POST',
headers:{
'X-API-Key':'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
$ch = curl_init('https://amigo.ng/api/data/');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: 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;
mobile_number starting with 090000 to simulate success without debiting.Prices shown are computed as cost − agent_discount. Validity is in days.
| Plan ID | Capacity | Validity | Price (₦) |
|---|
| Plan ID | Capacity | Validity | Price (₦) |
|---|
Efficiency is the successful delivery rate per plan (percentage). Higher is better.
| Plan ID | Capacity | Efficiency |
|---|
| Plan ID | Capacity | Efficiency |
|---|
Response (example):
{
"ok": true,
"MTN": [
{ "plan_id": 1001, "data_capacity": 1.00, "validity": 30, "price": 449.00, "efficiency_percent": 98.5, "efficiency_label": "Excellent" }
],
"Glo": [
{ "plan_id": 261, "data_capacity": 1.00, "validity": 30, "price": 439.00, "efficiency_percent": 93.0, "efficiency_label": "Good" }
]
}
Optional filters: ?network_id=1, ?min_eff=90
Recommended: header X-API-Key: <YOUR_API_TOKEN>.
Also supported: Authorization: Token <TOKEN> or Authorization: Bearer <TOKEN>. If using Authorization, ensure your server passes that header to PHP (see Quickstart note).
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."}
Send Idempotency-Key: <unique-uuid> to safely retry the same request.
Default: 1000 requests/minute (can be upgraded on request).