activate_referral_program
Switch a project's Referral Program on so links attribute and payments earn again. Emits referral.program_updated.
Turn a paused programme back on. Affiliates' links and codes attribute again, settled payments earn
again, and every approved or pending affiliate is told the terms as they now stand in their chat
and by mail. This is the counterpart of
deactivate_referral_program and the narrow
alternative to update_referral_program with
active: true: it emits referral.program_updated
with active as the one change.
Entitlement is checked on the way back on
Requires the Referral Program Addon or a Growth plan on the project
owner. A creator whose plan lost it is told why the programme stays off
with TEAM_TIER_REQUIRED; nothing is written.
Re-calling on a programme that is already on leaves it unchanged and emits nothing.
Requires ability
The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.
Runs the same action as
The REST endpoint and this tool share one action, so validation, permissions and events are identical.
Fires one event
Delivered to every endpoint subscribed to it once the change is made.
Annotations
A client that honours annotations asks a person before running it. Sending the same arguments twice changes nothing the second time.
Arguments
project_id*stringUUID of the project whose Referral Program to switch on.
What it returns
{ "data": { "id": "6e2a7a4f-3b8c-4c21-9f6d-2a3b4c5d6e7f", "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13", "active": true, "reward_kind": "free_days", "reward_days": 7, "friend_reward_kind": "none", "hold_days": 14, "plan_ids": [] }}The full get_referral_program row, with active: true.
How it fails
TEAM_TIER_REQUIREDthe project owner's plan does not include the Referral Program.
VALIDATION_FAILEDthe caller is a team member whose role lacks the team's referral-update
RESOURCE_NOT_FOUNDunknown project_id, a project on another team, one outside the token's
AUTHENTICATION_REQUIREDno authenticated user on the request.
TOKEN_MISSING_ABILITYtoken lacks project-referral:update.
How is this guide?
Last updated on
Referral Program Tools
A project's Referral Program turns members into affiliates: each gets a code and a link, a friend who arrives through them is counted for thirty days, and when that friend's first payment settles the affiliate earns free membership days or a cash commission the creator pays out.
add_referral_affiliate
Enrol a member of a project as an affiliate by hand, approved whatever the programme's switches say. Emits referral.affiliate_joined.