Developers/API Reference

API Reference

Complete reference for all REST API v1 endpoints.

Base URL

All API requests are made to the following base URL:

text
https://api.theaffiliateindex.com/v1

Authenticate every request by including your API key in the X-API-Key header:

bash
curl https://api.theaffiliateindex.com/v1/programs \
  -H "X-API-Key: tai_your_key_here"

Programs

GET/v1/programsprograms:read

Search and list affiliate programs. Supports full-text search, filtering by commission type, minimum/maximum commission rate, cookie duration, tracking platform, and verification status.

Parameters

NameTypeDescription
qstringFull-text search query
commission_typestring"recurring" | "one_time" | "hybrid" | "tiered"
min_commissionnumberMinimum commission percentage
max_commissionnumberMaximum commission percentage
min_cookie_daysnumberMinimum cookie duration in days
tracking_platformstringFilter by tracking platform (e.g. "rewardful", "impact")
verified_onlybooleanOnly return verified programs
sortstring"trending" | "commission_desc" | "commission_asc" | "cookie_desc" | "rating_desc" | "reviews_desc" | "newest"
pagenumberPage number (default: 1)
per_pagenumberResults per page (default: 20, max: 100)

Example Request

bash
curl "https://api.theaffiliateindex.com/v1/programs?q=email&commission_type=recurring&sort=trending&per_page=2" \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": [
    {
      "slug": "convertkit",
      "name": "ConvertKit",
      "description": "Email marketing platform for creators with 30% recurring commissions.",
      "commission_type": "recurring",
      "commission_rate": 30,
      "cookie_days": 90,
      "tracking_platform": "rewardful",
      "verified": true,
      "rating": 4.7,
      "review_count": 142,
      "logo_url": "https://cdn.theaffiliateindex.com/logos/convertkit.png",
      "categories": [
        "Email Marketing",
        "SaaS"
      ],
      "created_at": "2025-03-15T10:00:00Z"
    },
    {
      "slug": "mailerlite",
      "name": "MailerLite",
      "description": "Affordable email marketing with a generous affiliate program.",
      "commission_type": "recurring",
      "commission_rate": 30,
      "cookie_days": 30,
      "tracking_platform": "impact",
      "verified": true,
      "rating": 4.5,
      "review_count": 89,
      "logo_url": "https://cdn.theaffiliateindex.com/logos/mailerlite.png",
      "categories": [
        "Email Marketing"
      ],
      "created_at": "2025-04-02T14:30:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 2,
    "total": 37,
    "total_pages": 19
  }
}
GET/v1/programs/:slugprograms:read

Get full details for a single affiliate program, including its categories.

Parameters

NameTypeDescription
slug*stringProgram slug (path parameter)

Example Request

bash
curl https://api.theaffiliateindex.com/v1/programs/convertkit \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": {
    "slug": "convertkit",
    "name": "ConvertKit",
    "description": "Email marketing platform for creators with 30% recurring commissions.",
    "long_description": "ConvertKit is an email marketing platform built specifically for creators. Their affiliate program offers 30% recurring commission for every paying customer you refer, with a 90-day cookie window.",
    "commission_type": "recurring",
    "commission_rate": 30,
    "cookie_days": 90,
    "tracking_platform": "rewardful",
    "payout_minimum": 50,
    "payout_frequency": "monthly",
    "verified": true,
    "rating": 4.7,
    "review_count": 142,
    "logo_url": "https://cdn.theaffiliateindex.com/logos/convertkit.png",
    "website_url": "https://convertkit.com",
    "signup_url": "https://convertkit.com/affiliates",
    "categories": [
      {
        "slug": "email-marketing",
        "name": "Email Marketing"
      },
      {
        "slug": "saas",
        "name": "SaaS"
      }
    ],
    "organization": {
      "slug": "convertkit",
      "name": "ConvertKit"
    },
    "created_at": "2025-03-15T10:00:00Z",
    "updated_at": "2025-11-20T08:15:00Z"
  }
}
GET/v1/programs/:slug/reviewsreviews:read

Get reviews for a specific program. Returns paginated reviews sorted by most recent.

i

Reviews are read-only via the API.

Parameters

NameTypeDescription
slug*stringProgram slug (path parameter)
pagenumberPage number (default: 1)
per_pagenumberResults per page (default: 20, max: 50)

Example Request

bash
curl "https://api.theaffiliateindex.com/v1/programs/convertkit/reviews?per_page=1" \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": [
    {
      "id": "rev_a1b2c3d4",
      "rating": 5,
      "title": "Best recurring commission program",
      "body": "ConvertKit has been my top earner for 2 years running. The 30% recurring commission adds up fast and the product practically sells itself to creators.",
      "author": {
        "username": "sarah_marketer",
        "display_name": "Sarah Chen",
        "avatar_url": "https://cdn.theaffiliateindex.com/avatars/sarah_marketer.jpg"
      },
      "upvotes": 24,
      "created_at": "2025-10-12T16:30:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 1,
    "total": 142,
    "total_pages": 142
  }
}

Categories

GET/v1/categoriescategories:read

List all available program categories. Response is cached for 5 minutes.

i

This endpoint has no query parameters. Responses are cached for 5 minutes.

Example Request

bash
curl https://api.theaffiliateindex.com/v1/categories \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": [
    {
      "slug": "saas",
      "name": "SaaS",
      "program_count": 184,
      "icon": "cloud"
    },
    {
      "slug": "email-marketing",
      "name": "Email Marketing",
      "program_count": 37,
      "icon": "mail"
    },
    {
      "slug": "hosting",
      "name": "Hosting & Infrastructure",
      "program_count": 52,
      "icon": "server"
    },
    {
      "slug": "design-tools",
      "name": "Design Tools",
      "program_count": 28,
      "icon": "palette"
    },
    {
      "slug": "ecommerce",
      "name": "E-Commerce",
      "program_count": 91,
      "icon": "shopping-cart"
    },
    {
      "slug": "finance",
      "name": "Finance & Fintech",
      "program_count": 63,
      "icon": "dollar-sign"
    }
  ]
}
GET/v1/categories/:slugcategories:read

Get details for a single category including its description and program count.

Parameters

NameTypeDescription
slug*stringCategory slug (path parameter)

Example Request

bash
curl https://api.theaffiliateindex.com/v1/categories/email-marketing \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": {
    "slug": "email-marketing",
    "name": "Email Marketing",
    "description": "Affiliate programs for email marketing platforms, newsletter tools, and deliverability services.",
    "program_count": 37,
    "icon": "mail"
  }
}
GET/v1/categories/:slug/programsprograms:read

List all programs belonging to a specific category. Supports pagination.

Parameters

NameTypeDescription
slug*stringCategory slug (path parameter)
pagenumberPage number (default: 1)
per_pagenumberResults per page (default: 20, max: 100)

Example Request

bash
curl "https://api.theaffiliateindex.com/v1/categories/email-marketing/programs?per_page=1" \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": [
    {
      "slug": "convertkit",
      "name": "ConvertKit",
      "description": "Email marketing platform for creators with 30% recurring commissions.",
      "commission_type": "recurring",
      "commission_rate": 30,
      "cookie_days": 90,
      "verified": true,
      "rating": 4.7,
      "review_count": 142
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 1,
    "total": 37,
    "total_pages": 37
  }
}

Reviews

GET/v1/reviews/:idreviews:read

Get a specific review by its ID. Returns the full review including author details and associated program.

i

Reviews cannot be created or modified via the API.

Parameters

NameTypeDescription
id*stringReview ID (path parameter)

Example Request

bash
curl https://api.theaffiliateindex.com/v1/reviews/rev_a1b2c3d4 \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": {
    "id": "rev_a1b2c3d4",
    "rating": 5,
    "title": "Best recurring commission program",
    "body": "ConvertKit has been my top earner for 2 years running. The 30% recurring commission adds up fast and the product practically sells itself to creators.",
    "program": {
      "slug": "convertkit",
      "name": "ConvertKit"
    },
    "author": {
      "username": "sarah_marketer",
      "display_name": "Sarah Chen",
      "avatar_url": "https://cdn.theaffiliateindex.com/avatars/sarah_marketer.jpg"
    },
    "upvotes": 24,
    "created_at": "2025-10-12T16:30:00Z",
    "updated_at": "2025-10-12T16:30:00Z"
  }
}

Organizations

GET/v1/organizations/:slugorganizations:read

Get the public profile for an organization (brand) on the platform.

Parameters

NameTypeDescription
slug*stringOrganization slug (path parameter)

Example Request

bash
curl https://api.theaffiliateindex.com/v1/organizations/convertkit \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": {
    "slug": "convertkit",
    "name": "ConvertKit",
    "logo_url": "https://cdn.theaffiliateindex.com/logos/convertkit.png",
    "website_url": "https://convertkit.com",
    "description": "Email marketing platform built for creators. We help you grow and monetize your audience with powerful automation, landing pages, and integrations.",
    "plan": "pro",
    "program_count": 1,
    "created_at": "2025-02-10T09:00:00Z"
  }
}
GET/v1/organizations/:slug/programsprograms:read

List all affiliate programs published by a specific organization.

Parameters

NameTypeDescription
slug*stringOrganization slug (path parameter)
pagenumberPage number (default: 1)
per_pagenumberResults per page (default: 20, max: 100)

Example Request

bash
curl https://api.theaffiliateindex.com/v1/organizations/convertkit/programs \
  -H "X-API-Key: tai_your_key_here"

Example Response

json
{
  "data": [
    {
      "slug": "convertkit",
      "name": "ConvertKit",
      "description": "Email marketing platform for creators with 30% recurring commissions.",
      "commission_type": "recurring",
      "commission_rate": 30,
      "cookie_days": 90,
      "verified": true,
      "rating": 4.7,
      "review_count": 142
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 1,
    "total_pages": 1
  }
}