# API and Webhooks: Your affiliate program, from code

Create affiliates during your own onboarding, sync referrals into your CRM, and react to commissions and payouts as they happen.

## Highlights

- **REST API.** Endpoints for affiliates, campaigns, referrals, commissions and payouts, with JSON responses and pagination.
- **Webhooks.** Real-time events delivered to your endpoints, with delivery logs and retries.
- **Scoped API keys.** Create and revoke keys per organization from your settings.

## What's included

- **Affiliates and campaigns.** List, create, read and update affiliates and campaigns.
- **Referrals.** Create referrals from your own sign-up flow and update them with a Stripe customer ID, status or company.
- **Commissions and payouts.** Read commissions and payouts to build reports or reconcile with your accounting.
- **Events.** affiliate.created, affiliate.approved, referral.created, referral.converted, commission.created and payout.sent.
- **Same shape everywhere.** Webhook payloads use the same objects as the API, so one parser handles both.
- **Manage endpoints yourself.** Add endpoints, choose events, inspect deliveries and retry failures from Settings, Webhooks.

## FAQ

### Which plans include the API and webhooks?

Pro and Enterprise.

### How do I authenticate?

Create an API key in your organization settings and send it as a Bearer token.

### Is there an OpenAPI spec?

Yes. The API reference in our docs is generated from it.

## Links

- Read the API reference: https://www.promotekit.com/docs/api-reference
- Pricing: https://www.promotekit.com/pricing.md
- Sign up free: https://www.promotekit.com/auth/sign-up
