Quickstart
Get your API key and make your first request in under 2 minutes.
Step 1: Get your API key
To start using the API, you need an API key. Here's how to get one:
- Create an account or sign in to your existing account.
- Navigate to Dashboard and open the Developer tab.
- Click "Create API Key" and give it a descriptive name.
tai_ and is shown only once. Copy it and store it securely.Step 2: Make your first request
With your API key in hand, make a simple request to list affiliate programs. Pass your key in the X-API-Key header:
curl -H "X-API-Key: tai_your_key_here" \
"https://api.theaffiliateindex.com/v1/programs?per_page=3"This returns the first 3 affiliate programs sorted by default relevance.
Step 3: Explore the response
Every successful response follows a consistent shape. Here is what you will get back:
{
"data": [
{
"slug": "rewardful",
"name": "Rewardful",
"brand_name": "Rewardful Inc.",
"commission_type": "recurring",
"commission_percent": 20,
"cookie_duration_days": 60,
"average_rating": 4.7,
"review_count": 128,
"is_verified": true
}
],
"pagination": {
"page": 1,
"per_page": 3,
"has_more": true
}
}Key fields in each program object:
slug— Unique identifier used in URLs and further API calls.commission_type— Eitherrecurring,one-time, ortiered.commission_percent— The percentage commission offered to affiliates.cookie_duration_days— How long the referral cookie lasts.average_rating— Community rating out of 5.is_verified— Whether the program has been verified by the team.
The pagination object tells you the current page, items per page, and whether more results are available.
Step 4: Try more endpoints
Here are a few more requests to try out:
List categories — Browse all available program categories.
curl -H "X-API-Key: tai_your_key_here" \
"https://api.theaffiliateindex.com/v1/categories"Get a specific program — Fetch full details for a single program by slug.
curl -H "X-API-Key: tai_your_key_here" \
"https://api.theaffiliateindex.com/v1/programs/rewardful"List reviews for a program — See what affiliates are saying.
curl -H "X-API-Key: tai_your_key_here" \
"https://api.theaffiliateindex.com/v1/programs/rewardful/reviews"Search programs — Filter by keyword, category, or commission type.
curl -H "X-API-Key: tai_your_key_here" \
"https://api.theaffiliateindex.com/v1/programs?q=saas&category=developer-tools&commission_type=recurring"What's next?
Now that you have made your first request, dive deeper into the API: