Version
DESTRUCTIVE

approve_referral_affiliate

Approve a pending or suspended affiliate so their code counts from now on; they receive their link and the terms. Emits referral.affiliate_approved.

Approve an affiliate who is waiting, or bring a suspended one back. Their code counts from now on, and they receive their link, code and the programme's terms in their chat and by mail, the same notice the dashboard's approval sends; it emits referral.affiliate_approved.

Idempotent

An affiliate already approved is left as they are and nothing is emitted.

Requires ability

The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.

The REST endpoint and this tool share one action, so validation, permissions and events are identical.

Delivered to every endpoint subscribed to it once the change is made.

Annotations

DestructiveIdempotent

A client that honours annotations asks a person before running it. Sending the same arguments twice changes nothing the second time.

Arguments

project_id*string

UUID of the project the affiliate belongs to.

affiliate_id*string

UUID of the affiliate to approve.

What it returns

{  "data": {    "id": "0b1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b",    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",    "program_id": "6e2a7a4f-3b8c-4c21-9f6d-2a3b4c5d6e7f",    "member_id": "a1b2c3d4-e5f6-4718-8a9b-0c1d2e3f4a5b",    "code": "ADA2026",    "status": "approved",    "days_balance": 0,    "balances": [],    "joined_at": "2026-10-08T09:05:00+00:00",    "approved_at": "2026-10-08T10:00:00+00:00",    "created_at": "2026-10-08T09:05:00+00:00",    "updated_at": "2026-10-08T10:00:00+00:00"  }}

The get_referral_affiliate row after the change.

How it fails

VALIDATION_FAILED

the caller is a team member whose role lacks the team's referral-update

RESOURCE_NOT_FOUND

unknown project_id or affiliate_id, an affiliate of another project, or a

AUTHENTICATION_REQUIRED

no authenticated user on the request.

TOKEN_MISSING_ABILITY

token lacks project-referral:update.

How is this guide?

Last updated on