POST
Your webhook URLThe affiliate.approved event is triggered when a pending affiliate application is approved, either through the dashboard or the API. Use this to sync affiliate status changes with your own system.
Payload
json
{
"id": "evt_cm1abc2def3",
"event": "affiliate.approved",
"created_at": "2026-04-08T12:00:00.000Z",
"data": {
"affiliate": {
"email": "[email protected]",
"name": "Jane Smith",
"referral_code": "jane-smith"
},
"product": {
"id": "cuid_abc123",
"name": "My SaaS"
}
}
}
Payload fields
| Parameter | Type | Description |
|---|---|---|
idrequired | string | Unique event ID (prefixed with evt_). |
eventrequired | string | Always "affiliate.approved" for this event. |
created_atrequired | string | ISO 8601 timestamp of when the event occurred. |
data.affiliate.emailrequired | string | Email of the approved affiliate. |
data.affiliate.name | string | Name of the affiliate (may be null). |
data.affiliate.referral_coderequired | string | The affiliate's referral code. |
data.product.idrequired | string | Your Anderro product ID. |
data.product.namerequired | string | Your product name in Anderro. |
Example handler
javascript
app.post("/webhooks/anderro", (req, res) => {
const { event, data } = req.body;
if (event === "affiliate.approved") {
console.log(
`Affiliate approved: ${data.affiliate.email} (${data.affiliate.referral_code})`
);
// Enable affiliate-specific features
// Send a welcome package
// Update your CRM
}
res.status(200).send("OK");
});