API Reference
Auto-generated
Referral
API reference for referral endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.GET /api/v1/referral/my-link
GET
/api/v1/referral/my-linkGet My Referral Link
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/referral/my-link \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"code": "example",
"referral_url": "example",
"referrer_reward_display": "example",
"referee_reward_display": "example",
"is_active": true,
"created_at": "example"
}GET /api/v1/referral/stats
GET
/api/v1/referral/statsGet Referral Stats
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/referral/stats \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"code": "example",
"referral_url": "example",
"referrals_count": 0,
"successful_referrals": 0,
"total_credits_earned_display": "example",
"referrer_reward_display": "example"
}POST /api/v1/referral/validate-code
POST
/api/v1/referral/validate-codeValidate Code
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| code | string | Required | Code |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/referral/validate-code \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "example_code"
}'Response Example
JSON
{
"valid": true,
"referee_reward_display": "example",
"message": "example"
}