Place an order
Buy an eSIM or a number. This spends your API balance.
/api/v1/orders
Scope: order
Send a unique reference so a retry can never double-charge. For an eSIM, relay result.qr_code (or the result.lpa string for manual install) to your customer, then poll the order until it is completed.
For a number, the verification code arrives asynchronously. Poll the order: once the code is received, status becomes completed and result.code holds it. A number that never receives a code times out and its status becomes failed.
Body
| Field | Type | Notes |
|---|---|---|
type | string | esim or number |
plan_id | int | Required when type is esim (an id from /catalogue) |
number_type | string | otp or rental, required when type is number |
country | string | Required when type is number |
service | string | Required when type is number |
reference | string | Optional idempotency key, up to 64 characters |
Responses
| Status | Meaning |
|---|---|
201 | Order created |
200 | A repeated reference: the original order, once it has finished saving |
402 | Insufficient balance |
409 | duplicate_in_progress: retry the same reference shortly |
422 | Invalid plan, or number unavailable |
500 / 502 | Not delivered, and your balance was refunded |
curl -X POST https://naara.app/api/v1/orders \
-H "Authorization: Bearer $NAARA_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"esim","plan_id":12,"reference":"your-order-abc123"}'
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['base_uri' => 'https://naara.app/api/v1/']);
$response = $client->post('orders', [
'headers' => ['Authorization' => 'Bearer ' . getenv('NAARA_KEY')],
'json' => ['type' => 'esim', 'plan_id' => 12, 'reference' => 'your-order-abc123'],
]);
echo $response->getBody();
const res = await fetch("https://naara.app/api/v1/orders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NAARA_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ type: "esim", plan_id: 12, reference: "your-order-abc123" }),
});
console.log(await res.json());
import os
import requests
res = requests.post(
"https://naara.app/api/v1/orders",
headers={"Authorization": f"Bearer {os.environ['NAARA_KEY']}"},
json={"type": "esim", "plan_id": 12, "reference": "your-order-abc123"},
)
print(res.json())
{
"reference": "your-order-abc123",
"kind": "esim",
"status": "processing",
"price_usd": 11.0,
"currency": "USD",
"result": {
"iccid": "8944...",
"qr_code": "https://.../qr.png",
"lpa": "LPA:1$rsp.example.com$ACTIVATION-CODE"
},
"created_at": "2026-07-20T12:00:00+00:00"
}
curl -X POST https://naara.app/api/v1/orders \
-H "Authorization: Bearer $NAARA_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"number","number_type":"otp","country":"nigeria","service":"whatsapp","reference":"your-otp-xyz"}'
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['base_uri' => 'https://naara.app/api/v1/']);
$response = $client->post('orders', [
'headers' => ['Authorization' => 'Bearer ' . getenv('NAARA_KEY')],
'json' => ['type' => 'number', 'number_type' => 'otp', 'country' => 'nigeria', 'service' => 'whatsapp', 'reference' => 'your-otp-xyz'],
]);
echo $response->getBody();
const res = await fetch("https://naara.app/api/v1/orders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NAARA_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ type: "number", number_type: "otp", country: "nigeria", service: "whatsapp", reference: "your-otp-xyz" }),
});
console.log(await res.json());
import os
import requests
res = requests.post(
"https://naara.app/api/v1/orders",
headers={"Authorization": f"Bearer {os.environ['NAARA_KEY']}"},
json={"type": "number", "number_type": "otp", "country": "nigeria", "service": "whatsapp", "reference": "your-otp-xyz"},
)
print(res.json())
{
"reference": "your-otp-xyz",
"kind": "number",
"status": "processing",
"price_usd": 0.23,
"currency": "USD",
"result": {
"number": "+234...",
"code": null
},
"created_at": "2026-07-20T12:00:00+00:00"
}