Home
Solutions
Pricing
Developers
Blog
Company
+91 91610 19161 WhatsApp
Create account Login
  1. Home
  2. Developers
  3. Quickstart

Your first call in five minutes

Four steps from a new account to a live plan list. Every example works in cURL, PHP, Python and Node.js.

5 min readUpdated 15 Nov 2026

Want to try before you sign up? Run every endpoint in the free Sandbox: no account, KYC or wallet needed, same response format as live.

To call A1 Plan API you need three things: an approved account (e-KYC done), an active subscription plan, and your server IP whitelisted. After that, every endpoint is a simple GET request with your username and pwd.

1. Get your credentials

Create an account, complete e-KYC and choose a plan. Open API & IP Whitelist in the dashboard, copy your username and password and add the public IP of the server that will call us.

2. Find the operator and circle

curl -s "https://a1planapi.com/planapi/operatorCircleFetch?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&mobileno=9876543210"
<?php
$url = 'https://a1planapi.com/planapi/operatorCircleFetch?' . http_build_query(array(
    'username' => 'YOUR_USERNAME',
    'pwd' => 'YOUR_PASSWORD',
    'mobileno' => '9876543210',
));
$ch = curl_init($url);
curl_setopt_array($ch, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15));
$body = curl_exec($ch);
curl_close($ch);
$data = json_decode($body, true);
if (isset($data['ERROR']) && $data['ERROR'] === '0') {
    print_r($data);
} else {
    echo $data['Message'] ?? 'Request failed';
}
import requests

params = {
    'username': 'YOUR_USERNAME',
    'pwd': 'YOUR_PASSWORD',
    'mobileno': '9876543210',
}
r = requests.get('https://a1planapi.com/planapi/operatorCircleFetch', params=params, timeout=15)
data = r.json()
if data.get('ERROR') == '0':
    print(data)
else:
    print(data.get('Message', 'Request failed'))
const params = new URLSearchParams({
  username: 'YOUR_USERNAME',
  pwd: 'YOUR_PASSWORD',
  mobileno: '9876543210',
});
const res = await fetch('https://a1planapi.com/planapi/operatorCircleFetch?' + params, { signal: AbortSignal.timeout(15000) });
const data = await res.json();
if (data.ERROR === '0') {
  console.log(data);
} else {
  console.log(data.Message || 'Request failed');
}

Read OpCode and CircleCode from the response. "ERROR": "0" means success.

3. Fetch the plans

curl -s "https://a1planapi.com/planapi/planFetch?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&operatorcode=A&circle=49"
<?php
$url = 'https://a1planapi.com/planapi/planFetch?' . http_build_query(array(
    'username' => 'YOUR_USERNAME',
    'pwd' => 'YOUR_PASSWORD',
    'operatorcode' => 'A',
    'circle' => '49',
));
$ch = curl_init($url);
curl_setopt_array($ch, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15));
$body = curl_exec($ch);
curl_close($ch);
$data = json_decode($body, true);
if (isset($data['ERROR']) && $data['ERROR'] === '0') {
    print_r($data);
} else {
    echo $data['Message'] ?? 'Request failed';
}
import requests

params = {
    'username': 'YOUR_USERNAME',
    'pwd': 'YOUR_PASSWORD',
    'operatorcode': 'A',
    'circle': '49',
}
r = requests.get('https://a1planapi.com/planapi/planFetch', params=params, timeout=15)
data = r.json()
if data.get('ERROR') == '0':
    print(data)
else:
    print(data.get('Message', 'Request failed'))
const params = new URLSearchParams({
  username: 'YOUR_USERNAME',
  pwd: 'YOUR_PASSWORD',
  operatorcode: 'A',
  circle: '49',
});
const res = await fetch('https://a1planapi.com/planapi/planFetch?' + params, { signal: AbortSignal.timeout(15000) });
const data = await res.json();
if (data.ERROR === '0') {
  console.log(data);
} else {
  console.log(data.Message || 'Request failed');
}

Plans arrive in RDATA, grouped by category. Each pack has rs, validity and desc.

4. Check your quota

curl -s "https://a1planapi.com/planapi/usageStatus?username=YOUR_USERNAME&pwd=YOUR_PASSWORD"
<?php
$url = 'https://a1planapi.com/planapi/usageStatus?' . http_build_query(array(
    'username' => 'YOUR_USERNAME',
    'pwd' => 'YOUR_PASSWORD',
));
$ch = curl_init($url);
curl_setopt_array($ch, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15));
$body = curl_exec($ch);
curl_close($ch);
$data = json_decode($body, true);
if (isset($data['ERROR']) && $data['ERROR'] === '0') {
    print_r($data);
} else {
    echo $data['Message'] ?? 'Request failed';
}
import requests

params = {
    'username': 'YOUR_USERNAME',
    'pwd': 'YOUR_PASSWORD',
}
r = requests.get('https://a1planapi.com/planapi/usageStatus', params=params, timeout=15)
data = r.json()
if data.get('ERROR') == '0':
    print(data)
else:
    print(data.get('Message', 'Request failed'))
const params = new URLSearchParams({
  username: 'YOUR_USERNAME',
  pwd: 'YOUR_PASSWORD',
});
const res = await fetch('https://a1planapi.com/planapi/usageStatus?' + params, { signal: AbortSignal.timeout(15000) });
const data = await res.json();
if (data.ERROR === '0') {
  console.log(data);
} else {
  console.log(data.Message || 'Request failed');
}

Returns PlanName, DaysLeft, DailyHitLimit and HitsUsedToday. Call it at start-up or for a dashboard, not before every request.

Handle errors safely

  • Treat any response where ERROR is not "0" as a failure and show the Message to your logs.
  • Read keys case-insensitively: DTH endpoints return error, others return ERROR.
  • Use a timeout of about 15 seconds and retry once, never in a tight loop.
Next: browse the full API reference or read API errors and retries.

Ready for production?

Pick the plan that fits your daily volume. Every plan includes every endpoint.