Authentication

How to authenticate with the Anderro API using secret keys.

API keys

All API requests are authenticated using a Secret Key passed in the x-api-key header. Each SaaS product in your Anderro account has its own unique API key pair.

POSTAll /api/v1/* endpoints

Key format

Key typePrefixUsage
Secret Keysk_Server-side API calls

Security

Your secret key grants full access to manage affiliates in your program. Never expose it in client-side code, Git repositories, or logs.

Using your API key

Include the key in the x-api-key header with every 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]"}'

Finding your key

  1. Log in to anderro.com
  2. Go to Products and select your SaaS product
  3. Open the Integration tab
  4. Your Secret Key is shown there - click to copy

Regenerating keys

If your key is compromised, you can regenerate it from the Integration tab. This immediately invalidates the old key - all requests using the old key will return 401.

Error responses

StatusErrorMeaning
401Missing x-api-key headerNo API key was provided
401Invalid API key formatKey doesn't start with sk_
401Invalid or revoked API keyKey doesn't match any active product