API Documentation
Claim Referral Code
Rewards Actions
Create Referral User
Create a referral user. Update the referral user if already exists.
curl --request POST \
--url https://api.winwinkit.com/referral/users \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"is_premium": true,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": "2025-02-10T10:28:18.104Z",
"metadata": {
"key": "value"
}
}'
{
"data": {
"referral_user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"code": "XYZ123",
"preview_link": "https://example.wwk.link/XYZ123",
"is_premium": true,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": "2025-02-10T10:28:18.104Z",
"metadata": {
"key": "value"
},
"program": {
"id": "77dc-5508-40d3-8723-472e884b55fe",
"name": "Free month",
"description": "Free month for each invited user.",
"distribution_percentage": 100,
"limit": 100,
"metadata": {
"key": "value"
},
"rewards": {
"sender": {
"basic": {
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"activationConfiguration": {
"variant": "claim",
"amount": 1
},
"deactivationConfiguration": {
"variant": "never"
}
},
"credit": {
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"limit": 0,
"activationConfiguration": {
"variant": "claim",
"amount": 1
},
"deactivationConfiguration": {
"variant": "never"
}
}
},
"receiver": {
"basic": {
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"activationConfiguration": {
"variant": "claim"
},
"deactivationConfiguration": {
"variant": "never"
}
},
"credit": {
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"activationConfiguration": {
"variant": "claim"
},
"deactivationConfiguration": {
"variant": "never"
}
}
}
}
},
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2025-02-10T10:28:18.104Z"
},
"rewards": {
"active": {
"basic": [
{
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"expires_at": null,
"created_at": "2025-02-10T10:28:18.104Z"
}
],
"credit": [
{
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"expires_at": null,
"created_at": "2025-02-10T10:28:18.104Z"
}
]
},
"expired": {
"basic": [
{
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"expires_at": "2025-02-10T10:28:18.104Z",
"created_at": "2024-11-10T10:28:18.104Z"
}
],
"credit": [
{
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"expires_at": "2025-02-10T10:28:18.104Z",
"created_at": "2024-11-10T10:28:18.104Z"
}
]
}
},
"stats": {
"claims": 10,
"conversions": 8,
"churns": 1
}
}
}
}
Authorizations
The API key to authenticate with.
Body
The referral user.
The unique identifier of the referral user.
4
Is the referral user premium.
Date when the referral user was first seen at.
Date when the referral user was last seen at.
Key-value object allowing you to store additional information.
Response
Data object containing the referral user object.
The referral user.
The unique identifier of the referral user.
4
The referral code.
Link to Preview Link with user's referral code.
Referral program.
Identifier of the referral program.
Name of the referral program.
Description of the referral program.
Distribution percentage of the referral program among newly registered users.
Limit of how many times referral code can be claimed.
Key-value object allowing you to store additional information.
Referral user's rewards.
Referral user's statistics.
How many users claimed the referral code of this referral user.
How many users who claimed the referral code of this referral used converted to premium. Requires you to update is_premium
property of referral users.
How many users who claimed the referral code of this referral used converted to premium and then churned. Requires you to update is_premium
property of referral users.
Is the referral user premium.
Date when the referral user was first seen at.
Date when the referral user was last seen at.
Key-value object allowing you to store additional information.
curl --request POST \
--url https://api.winwinkit.com/referral/users \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"is_premium": true,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": "2025-02-10T10:28:18.104Z",
"metadata": {
"key": "value"
}
}'
{
"data": {
"referral_user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"code": "XYZ123",
"preview_link": "https://example.wwk.link/XYZ123",
"is_premium": true,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": "2025-02-10T10:28:18.104Z",
"metadata": {
"key": "value"
},
"program": {
"id": "77dc-5508-40d3-8723-472e884b55fe",
"name": "Free month",
"description": "Free month for each invited user.",
"distribution_percentage": 100,
"limit": 100,
"metadata": {
"key": "value"
},
"rewards": {
"sender": {
"basic": {
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"activationConfiguration": {
"variant": "claim",
"amount": 1
},
"deactivationConfiguration": {
"variant": "never"
}
},
"credit": {
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"limit": 0,
"activationConfiguration": {
"variant": "claim",
"amount": 1
},
"deactivationConfiguration": {
"variant": "never"
}
}
},
"receiver": {
"basic": {
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"activationConfiguration": {
"variant": "claim"
},
"deactivationConfiguration": {
"variant": "never"
}
},
"credit": {
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"activationConfiguration": {
"variant": "claim"
},
"deactivationConfiguration": {
"variant": "never"
}
}
}
}
},
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2025-02-10T10:28:18.104Z"
},
"rewards": {
"active": {
"basic": [
{
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"expires_at": null,
"created_at": "2025-02-10T10:28:18.104Z"
}
],
"credit": [
{
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"expires_at": null,
"created_at": "2025-02-10T10:28:18.104Z"
}
]
},
"expired": {
"basic": [
{
"key": "extended-premium-trial",
"name": "Extended Premium Trial",
"description": "Extend Premium trial for 14 more days.",
"metadata": {
"key": "value"
},
"expires_at": "2025-02-10T10:28:18.104Z",
"created_at": "2024-11-10T10:28:18.104Z"
}
],
"credit": [
{
"key": "credits-level-one",
"credits": 100,
"name": "Level one",
"description": "Grant credits for completing 100 levels.",
"metadata": {
"key": "value"
},
"expires_at": "2025-02-10T10:28:18.104Z",
"created_at": "2024-11-10T10:28:18.104Z"
}
]
}
},
"stats": {
"claims": 10,
"conversions": 8,
"churns": 1
}
}
}
}