API Documentation
Claim Referral Code
Rewards Actions
Withdraw Credits
Withdraw credits for the referral user.
curl --request POST \
--url https://api.winwinkit.com/referral/users/{app_user_id}/rewards/credit/{key}/withdraw \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"credits": 10
}'
{
"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"
},
"expired_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"
},
"expired_at": "2025-02-10T10:28:18.104Z",
"created_at": "2024-11-10T10:28:18.104Z"
}
]
}
},
"stats": {
"claims": 10,
"conversions": 8,
"churns": 1
}
},
"withdraw_result": {
"credits_available_at_start": 100,
"credits_available_at_end": 90,
"credits_requested_to_withdraw": 10,
"credits_withdrawn": 10
}
}
}
Authorizations
The API key to authenticate with.
Path Parameters
The app user id of the referral user.
The credit referral reward key.
Body
The credits amount to withdraw.
x > 0
10
Response
Data object containing the referral user and withdraw result objects.
The referral user.
The unique identifier of the referral user.
4
"821fae4b5-1a2d-4c1e-9152-5297086a161c"
The referral code.
"XYZ123"
Link to Preview Link with user's referral code.
"https://example.wwk.link/XYZ123"
Referral program.
Identifier of the referral program.
"77dc-5508-40d3-8723-472e884b55fe"
Name of the referral program.
"Free month"
Description of the referral program.
"Free month for each invited user."
Distribution percentage of the referral program among newly registered users.
100
Limit of how many times referral code can be claimed.
100
Key-value object allowing you to store additional information.
{ "key": "value" }
Referral user's eligibility to claim referral code.
Referral user's rewards.
Referral user's statistics.
How many users claimed the referral code of this referral user.
10
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.
8
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.
1
Is the referral user premium.
true
Date when the referral user was first seen at.
"2024-11-10T10:28:18.104Z"
Date when the referral user was last seen at.
"2025-02-10T10:28:18.104Z"
Key-value object allowing you to store additional information.
{ "key": "value" }
Withdraw credits result.
Credits available at start.
100
Credits available at end.
90
Credits requested to withdraw.
10
Credits actually withdrawn.
10
curl --request POST \
--url https://api.winwinkit.com/referral/users/{app_user_id}/rewards/credit/{key}/withdraw \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"credits": 10
}'
{
"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"
},
"expired_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"
},
"expired_at": "2025-02-10T10:28:18.104Z",
"created_at": "2024-11-10T10:28:18.104Z"
}
]
}
},
"stats": {
"claims": 10,
"conversions": 8,
"churns": 1
}
},
"withdraw_result": {
"credits_available_at_start": 100,
"credits_available_at_end": 90,
"credits_requested_to_withdraw": 10,
"credits_withdrawn": 10
}
}
}