Referrals
Create referral code
POST
/beltempo/referral/createCreate a per-ambassador referral code. Codes are scoped to your merchant — other merchants can't see or list them.
- Authenticated: API key or merchant JWT. An unauthenticated call returns 401.
Authentication
Accepts either an API key (X-API-Key) or a dashboard JWT (Authorization: Bearer …).
Body parameters
user_idstringrequiredthe ambassador this code belongs to — or pass user_email instead
user_emailstringoptionalalternative to user_id: resolves to an existing customer by email
codestringrequired2–64 chars, a–z 0–9 _ -
referrer_cashback_percentnumberoptionalreferred_cashback_percentnumberoptionalPOST
/beltempo/referral/createcurl --request POST "https://api.trevi.cash/beltempo/referral/create" \
--header "Content-Type: application/json" \
--header "X-API-Key: $TREVI_API_KEY" \
--data '{ "user_id": "user_abc...", "code": "alice2026" }'Was this page helpful?
