Quickstart

Get up and running with the Anderro API in under 5 minutes.

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

  1. Log in to your Anderro dashboard
  2. Go to Products and select your SaaS product
  3. Navigate to the Integration tab
  4. 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:

  1. Go to your product's Webhooks tab in the dashboard
  2. Enter your webhook endpoint URL
  3. Select the events you want to receive
  4. Copy the webhook secret for signature verification

See the Webhooks Overview for implementation details.

Next steps