# AffiliateRail API > Affiliate program software for SaaS. REST API at https://api.affiliaterail.com, one consistent contract over every object: programs, partners, groups, tags, applications (including approve and reject), links, coupons, clicks, referrals, customers, sales, commissions, balances, payouts, payout batches, flows, reports, risk flags, resources, campaigns, sequences, webhook endpoints and tax-form statuses. Auth is `Authorization: Bearer rail_live_…` with per-key scopes. Lists return `{ data, has_more, total_count }` with cursor pagination. Amounts are integer minor units with a currency. Every POST honours `Idempotency-Key`. 25 requests per second per key, with named rate-limit headers. ## Docs - [OpenAPI 3.1](https://api.affiliaterail.com/v1/openapi.json): the machine-readable contract - [Full API reference as text](https://api.affiliaterail.com/llms-full.txt): every route, parameter and schema - [Rendered reference](https://api.affiliaterail.com/docs) - [Webhook event catalogue](https://app.affiliaterail.com/webhooks/llms.txt): event names, payloads, signature verification - [Server-side attribution](https://api.affiliaterail.com/docs/integrations): pass the `rail_referral` cookie as Stripe metadata; Node, Next.js and Python ## SDK - `@rail/api-client` (TypeScript, generated from the OpenAPI document)