Version
DESTRUCTIVE

deactivate_referral_program

Switch a project's Referral Program off — links stop attributing and payments stop earning, while what affiliates earned stays. Emits referral.program_updated.

The safe way to stop a programme. Links and codes stop attributing and settled payments stop earning at once, while the ledger and the payouts stay readable so affiliates can still be paid what they are owed, and every affiliate is told their link no longer counts new friends. It emits referral.program_updated with active as the one change.

Prefer this over deleting

delete_referral_program is refused while any affiliate is owed a commission; pausing never is, and keeps every row.

Re-calling on a programme that is already off 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 off.

What it returns

{  "data": {    "id": "6e2a7a4f-3b8c-4c21-9f6d-2a3b4c5d6e7f",    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",    "active": false,    "reward_kind": "free_days",    "reward_days": 7,    "friend_reward_kind": "none",    "hold_days": 14,    "plan_ids": []  }}

The full get_referral_program row, with active: false.

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