Remove Affiliates (Bulk)

Remove up to 100 affiliates from your program in a single call.

POST/api/v1/affiliates/remove/bulk

Remove multiple affiliates at once. Each email is processed independently - failures for individual entries don't affect others. Maximum 100 emails per request.

Request body

ParameterTypeDescription
emailsrequired
string[]Array of email addresses to remove (1-100 items).

Example request

bash
curl -X POST https://anderro.com/api/v1/affiliates/remove/bulk \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_your_secret_key" \
  -d '{
    "emails": [
      "[email protected]",
      "[email protected]",
      "[email protected]"
    ]
  }'

Responses

200Bulk removal completed
json
{
  "results": [
    {
      "email": "[email protected]",
      "success": true,
      "partnershipId": "cuid_aaa"
    },
    {
      "email": "[email protected]",
      "success": true,
      "partnershipId": "cuid_bbb"
    },
    {
      "email": "[email protected]",
      "success": false,
      "error": "User not found"
    }
  ],
  "summary": {
    "total": 3,
    "removed": 2,
    "failed": 1
  }
}

Possible per-entry errors

ErrorMeaning
User not foundEmail doesn't match any Anderro user
No affiliate profileUser exists but has no affiliate profile
Not in programAffiliate is not in your specific program
Already removedAffiliate was already removed previously
Processing failedUnexpected error processing this entry

Partial success

The bulk endpoint always returns 200 even if some entries fail. Check the results array and summary to see which entries succeeded or failed.