use_referral_code
Redeem a referral code by providing the code, user identifier, and type. Supports dry-run validation before confirmation.
Instructions
Redeem a referral code for a user: PATCH /api/v1/referral_codes/:code/use. Creates referral_code_uses, increments actual_uses, sets user_referrers with source=code_redemption (GET /referral_codes/status → referred:true). Referrer is the code owner (do not pass referrer_identifier). Requires user has no existing referrer unless service_role idempotent replay of the same code. No wallet signature with service_role. Auth: project API key only (pass project_api_key or set env FUUL_MCP_PROJECT_API_KEY). Dashboard OAuth from fuul-mcp login is not accepted on these routes. dry_run then confirmed. Example dry_run: {"referral_code":"PROMO2024","user_identifier":"0xUser...","user_identifier_type":"evm_address","dry_run":true}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_api_key | No | Project API key used as Bearer for this request. Falls back to FUUL_MCP_PROJECT_API_KEY when omitted. | |
| dry_run | No | If true, validate and return a preview only; no server mutation. | |
| confirmed | No | Must be true to perform the mutation after reviewing dry_run output. | |
| referral_code | Yes | Referral code string (path segment). Referrer is inferred from the code owner on the server. | |
| user_identifier | Yes | ||
| user_identifier_type | Yes |