Code examples
https://neurogatty.com/api/v1
cURL
TOKEN=pt_xxx
BASE=https://neurogatty.com/api/v1
# Create sub-account
curl -s -X POST "$BASE/sub-accounts" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"label":"demo"}'
# Allocate 10 GB
curl -s -X POST "$BASE/sub-accounts/UUID/traffic" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"gb":10}'
PHP
$ch = curl_init('https://neurogatty.com/api/v1/balance');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer '.$token, 'Accept: application/json'],
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);
Node.js
const res = await fetch('https://neurogatty.com/api/v1/pricing', {
headers: { Authorization: `Bearer ${token}` }
});
console.log(await res.json());