Overview
The Anderro API lets you programmatically manage affiliates in your program. You can register new affiliates, remove them, and receive real-time webhook notifications when events occur.
Step 1: Get your API key
- Log in to your Anderro dashboard
- Go to Products and select your SaaS product
- Navigate to the Integration tab
- Copy your Secret Key (starts with
sk_)
Keep your key secret
Never expose your secret key in client-side code or public repositories. It grants full API access to your product.
Step 2: Make your first API call
Register an affiliate using a simple POST request:
bash
curl -X POST https://anderro.com/api/v1/affiliates \
-H "Content-Type: application/json" \
-H "x-api-key: sk_your_secret_key" \
-d '{
"email": "[email protected]",
"name": "Jane Smith"
}'
You'll receive a response like this:
json
{
"affiliate": {
"id": "abc123",
"email": "[email protected]",
"name": "Jane Smith",
"isNew": true
},
"partnership": {
"id": "xyz789",
"status": "active",
"referralCode": "jane-smith"
}
}
Step 3: Set up webhooks (optional)
To receive real-time notifications when affiliates sign up through referral links or generate commissions:
- Go to your product's Webhooks tab in the dashboard
- Enter your webhook endpoint URL
- Select the events you want to receive
- Copy the webhook secret for signature verification
See the Webhooks Overview for implementation details.
Next steps
- Authentication - learn about API key management
- API Overview - base URL, error format, rate limits
- List Affiliates - query your affiliates with stats
- Get Stats - retrieve KPIs for your program
- List Commissions - view commission records
- List Payouts - manage affiliate payouts
- Pagination - navigate large result sets
- Rate Limits - understand API usage limits
- Webhooks - receive real-time event notifications