Remove Affiliate

Remove a single affiliate from your program.

POST/api/v1/affiliates/remove

Remove 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.

Request body

ParameterTypeDescription
emailrequired
stringEmail 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": "User not found"
}

Returned when the email doesn't match any user, the user has no affiliate profile, or the affiliate is not in your program. Possible error messages:

  • User not found
  • Affiliate profile not found
  • Affiliate is not in this program
409Already removed
json
{
  "error": "Affiliate is already removed from this program"
}