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.

Each successful removal sends affiliate.removed when enabled in your webhook settings, as do all other removal paths. Failed entries do not send removal events.

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": "Not in program"
    }
  ],
  "summary": {
    "total": 3,
    "removed": 2,
    "failed": 1
  }
}

Possible per-entry errors

ErrorMeaning
Not in programEmail has no user, no affiliate profile, or no membership in your 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.