Skip to main content
POST
Claim an app user

Endpoint

Creates a customer for the app user and links them to a partner, based on the code the user entered or the partner app link they opened. Purchases later reported for the same app user ID, by RevenueCat or the transactions API, are credited to that partner. The Swift and Android SDKs call this endpoint for you. Call it directly from React Native, Flutter or other apps.
This endpoint is public. It takes no API key, only your Program ID from the program’s Integration page, so it’s safe to call from the app. It works for affiliate programs with Enable mobile app claims turned on in Program settings → Tracking for mobile apps.

Path parameters

Request body

Request

cURL

Response

data.status is one of:

Errors

Errors return "status": 0 and a message.

Usage notes

  • First claim wins. A user is linked to one partner only. Later claims for the same app_user_id, with any code, return already_claimed.
  • Claim after sign-in. Use a stable user ID. RevenueCat’s anonymous IDs ($RCAnonymousID:…) aren’t valid, because they change when the app is reinstalled.
  • Store the code until it’s claimed. If the user opens an app link before signing in, keep partnero_code and partnero_click and claim after sign-in. Retry when the request fails with a network error, a 429 or a 5xx.
  • Rewards wait for a transaction. Anyone with your Program ID and a partner’s code can call this endpoint, so a claimed customer earns the partner nothing until a purchase is recorded for them.