PATCH
/
referral
/
users
/
{app_user_id}
curl --request PATCH \
  --url https://api.winwinkit.com/referral/users/{app_user_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "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

X-API-KEY
string
header
required

The API key to authenticate with.

Path Parameters

app_user_id
string
required

The app user id of the referral user.

Body

application/json

The referral user.

is_premium
boolean | null

Is the referral user premium.

first_seen_at
string | null

Date when the referral user was first seen at.

last_seen_at
string | null

Date when the referral user was last seen at.

metadata
object

Key-value object allowing you to store additional information.

Response

200
application/json
Referral user updated.
data
object
required

Data object containing the referral user object.