Skip to main content

OpenAPI Spec

Machine-readable OpenAPI contract for AffiliateBase /api/v1

Table of Contents

OpenAPI Spec

For SDK generation, agent tooling, and LLM ingestion, use the canonical OpenAPI file:

  • https://affiliatebase.io/openapi/v1.yaml (marketing site)
  • /openapi/v1.yaml (relative path)

Download

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

Notes

  • The spec covers the current /api/v1 backend surface.
  • Auth is modeled as Bearer, Basic, or X-Api-Key.
  • Account context is required via account_id query or X-Account-Id header.
  • For highest accuracy, prefer this file over prose snippets when generating code.

Suggested Tooling

Generate a TypeScript client:

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

Generate typed definitions only:

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