Version
DESTRUCTIVE

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.

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 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_REQUIRED

the project owner's plan does not include the Referral Program.

VALIDATION_FAILED

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

RESOURCE_NOT_FOUND

unknown project_id, a project on another team, one outside the token's

AUTHENTICATION_REQUIRED

no authenticated user on the request.

TOKEN_MISSING_ABILITY

token lacks project-referral:update.

How is this guide?

Last updated on