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/v1backend surface. - Auth is modeled as Bearer, Basic, or
X-Api-Key. - Account context is required via
account_idquery orX-Account-Idheader. - 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