Partner API / Quickstart
Quickstart
From nothing to your first response in five minutes.
1
Create a key
Open API key on your dashboard, give it a label and press Create key. Copy it straight away: it is shown once.
2
Keep it out of your code
Store it as an environment variable. Every example in these docs reads AP_KEY.
export AP_KEY="ap_live_..."
3
Make your first call
Ask for today's numbers across every program.
curl https://api.affiliatepipe.com/v1/stats \ -H "Authorization: Bearer $AP_KEY"
$ch = curl_init('https://api.affiliatepipe.com/v1/stats');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AP_KEY')],
]);
$data = json_decode(curl_exec($ch), true);import os, requests
r = requests.get(
"https://api.affiliatepipe.com/v1/stats",
headers={"Authorization": "Bearer " + os.environ["AP_KEY"]},
)
data = r.json()const r = await fetch("https://api.affiliatepipe.com/v1/stats", {
headers: { Authorization: `Bearer ${process.env.AP_KEY}` },
});
const data = await r.json();4
Read the response
Money is in minor units: 18720 with "usd" means $187.20.
{
"period": "7d",
"from": "2026-09-19T00:00:00Z",
"to": "2026-09-26T00:00:00Z",
"clicks": 1284,
"filtered": 96,
"conversions": 11,
"pending": { "amount": 18720, "currency": "usd" },
"approved": { "amount": 40230, "currency": "usd" },
"programs": [
{ "domain": "greyhoundapi.com", "clicks": 804, "filtered": 51, "conversions": 7 }
]
}Next Build something real with the Discord bot guide, or connect your AI assistant.