Get a quote
Find out the exact price before you order.
/api/v1/quote
Scope: quote
A quote never spends anything. For an eSIM pass the plan_id; for a number pass the type, country and service. Number prices are fetched live.
Body
| Field | Type | Notes |
|---|---|---|
type | string | esim or number |
plan_id | int | Required when type is esim |
number_type | string | otp or rental, required when type is number |
country | string | Required when type is number, for example nigeria or usa |
service | string | Required when type is number, for example whatsapp |
Nothing available
If no number is available for that country and service, you get 422 with {"error": "unavailable"}.
curl -X POST https://naara.app/api/v1/quote \
-H "Authorization: Bearer $NAARA_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"esim","plan_id":12}'
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['base_uri' => 'https://naara.app/api/v1/']);
$response = $client->post('quote', [
'headers' => ['Authorization' => 'Bearer ' . getenv('NAARA_KEY')],
'json' => ['type' => 'esim', 'plan_id' => 12],
]);
echo $response->getBody();
const res = await fetch("https://naara.app/api/v1/quote", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NAARA_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ type: "esim", plan_id: 12 }),
});
console.log(await res.json());
import os
import requests
res = requests.post(
"https://naara.app/api/v1/quote",
headers={"Authorization": f"Bearer {os.environ['NAARA_KEY']}"},
json={"type": "esim", "plan_id": 12},
)
print(res.json())
{
"type": "esim",
"plan_id": 12,
"price_usd": 11.0,
"currency": "USD"
}
curl -X POST https://naara.app/api/v1/quote \
-H "Authorization: Bearer $NAARA_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"number","number_type":"otp","country":"nigeria","service":"whatsapp"}'
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['base_uri' => 'https://naara.app/api/v1/']);
$response = $client->post('quote', [
'headers' => ['Authorization' => 'Bearer ' . getenv('NAARA_KEY')],
'json' => ['type' => 'number', 'number_type' => 'otp', 'country' => 'nigeria', 'service' => 'whatsapp'],
]);
echo $response->getBody();
const res = await fetch("https://naara.app/api/v1/quote", {
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" }),
});
console.log(await res.json());
import os
import requests
res = requests.post(
"https://naara.app/api/v1/quote",
headers={"Authorization": f"Bearer {os.environ['NAARA_KEY']}"},
json={"type": "number", "number_type": "otp", "country": "nigeria", "service": "whatsapp"},
)
print(res.json())
{
"type": "number",
"number_type": "otp",
"country": "nigeria",
"service": "whatsapp",
"price_usd": 0.23,
"currency": "USD"
}