Skip to main content

AffiliateBase OpenAPI Specification

Download the machine-readable AffiliateBase REST API contract for client generation, agent tooling, and endpoint validation.

Table of Contents

The AffiliateBase OpenAPI specification is the machine-readable contract for the /api/v1 REST API. Download it to generate SDK clients, configure agent tooling, or validate endpoints.

The file is available at:

  • https://affiliatebase.io/openapi/v1.yaml (absolute URL)
  • /openapi/v1.yaml (path on the marketing site)

Download

Terminal
curl -fsSL https://affiliatebase.io/openapi/v1.yaml -o affiliatebase-v1.yaml

What the spec covers

  • The spec covers the current /api/v1 backend surface.
  • Auth is modeled as Bearer, Basic, or X-Api-Key with an AffiliateBase API key. OAuth access tokens issued to AI connectors are not accepted at /api/v1.
  • Account context is required via account_id query or X-Account-Id header.
  • When generating code, prefer this file over prose snippets. For permissions, rate limits, and behavior notes, see API Keys and REST API.

Generate a client

Generate a TypeScript client with openapi-typescript-codegen:

Terminal
npx openapi-typescript-codegen --input affiliatebase-v1.yaml --output ./generated/affiliatebase

Generate TypeScript type definitions only with openapi-typescript:

Terminal
npx openapi-typescript affiliatebase-v1.yaml -o affiliatebase.d.ts
Esc