Claim Actions

Claims a code for a user. Code can be affiliate, promo or referral code. The user is created if it does not exist yet, and any user properties given in the body are applied to it before the code is claimed.

post/users/{app_user_id}/claim-code

Request

Path parameters

app_user_idstring required

The app user id of the user to claim the code for. A user is created for this app user id if none exists yet.

Headers

x-api-keystring required

The API key to authenticate with.

Request body

codestring required

The code to claim. Can be affiliate, promo or referral code.

Example request

{
  "code": "XYZ123",
  "user": {
    "first_seen_at": "2024-11-10T10:28:18.104Z",
    "metadata": {},
    "stripe_customer_id": "cus_1234567890"
  }
}

Response

Updated user and granted rewards.

Changes

    • info

      added the new optional request property

    • info

      added the required property /////////// to the response with the status

    • info

      added the required property ////// to the response with the status