POST
/api/v1/affiliates/remove/bulkRemove 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
| Parameter | Type | Description |
|---|---|---|
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
| Error | Meaning |
|---|---|
Not in program | Email has no user, no affiliate profile, or no membership in your program |
Already removed | Affiliate was already removed previously |
Processing failed | Unexpected 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.