POST
/api/v1/affiliates/removeRemove an affiliate from your program. The affiliate's account is not deleted - they are marked as "removed" from your specific product and can be re-added later via the register endpoint.
A successful removal sends affiliate.removed when enabled in your webhook settings, as do all other removal paths.
Request body
| Parameter | Type | Description |
|---|---|---|
emailrequired | string | Email address of the affiliate to remove. |
Example request
bash
curl -X POST https://anderro.com/api/v1/affiliates/remove \
-H "Content-Type: application/json" \
-H "x-api-key: sk_your_secret_key" \
-d '{
"email": "[email protected]"
}'
Responses
200Affiliate removed successfully
json
{
"success": true,
"partnershipId": "cuid_xyz789",
"status": "removed"
}
404Affiliate not found
json
{
"error": "Affiliate is not in this program"
}
Returned when the email does not match a user, the user has no affiliate profile, or the affiliate is not in your program. All three cases use the same error message.
409Already removed
json
{
"error": "Affiliate is already removed from this program"
}