You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applies a referral code to the authenticated user.
133
+
134
+
**Request Body:**
135
+
```json
136
+
{
137
+
"echoAppId": "your_app_id",
138
+
"code": "ABC123XYZ"
139
+
}
140
+
```
141
+
142
+
**Success Response:**
143
+
```json
144
+
{
145
+
"success": true,
146
+
"message": "Referral code applied successfully"
147
+
}
148
+
```
149
+
150
+
**Error Response (400):**
151
+
```json
152
+
{
153
+
"success": false,
154
+
"message": "Referral code could not be applied. It may be invalid, expired, or you may already have a referrer for this app."
155
+
}
156
+
```
157
+
158
+
### Important Notes
159
+
160
+
- Referral codes are unique per user per app
161
+
- A user can only have one referrer per app (first come, first served)
162
+
- Invalid or expired codes should fail silently on the client to avoid UX disruption
163
+
- Referral earnings are calculated and paid out automatically by Echo
164
+
21
165
## Beta Status
22
166
23
167
This feature is in early beta and may not work as expected. Reach out in [Discord](https://discord.gg/merit) if you're interested in setting up referrals for your application.
0 commit comments