Claim an app user
curl --request POST \
--url https://api.partnero.com/pub/v1/mobile/{program_id}/claims \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.partnero.com/pub/v1/mobile/{program_id}/claims"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.partnero.com/pub/v1/mobile/{program_id}/claims', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.partnero.com/pub/v1/mobile/{program_id}/claims",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.partnero.com/pub/v1/mobile/{program_id}/claims"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.partnero.com/pub/v1/mobile/{program_id}/claims")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partnero.com/pub/v1/mobile/{program_id}/claims")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 1,
"data": {
"status": "claimed",
"app_user_id": "user_8f2k"
}
}
{
"status": 0,
"message": "Code not found"
}
{
"status": 0,
"message": "Claim window closed"
}
Mobile
Claim an app user
Link an app user to the partner whose code or app link they used. Called from the app with your public Program ID, never your API key.
POST
/
pub
/
v1
/
mobile
/
{program_id}
/
claims
Claim an app user
curl --request POST \
--url https://api.partnero.com/pub/v1/mobile/{program_id}/claims \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.partnero.com/pub/v1/mobile/{program_id}/claims"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.partnero.com/pub/v1/mobile/{program_id}/claims', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.partnero.com/pub/v1/mobile/{program_id}/claims",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.partnero.com/pub/v1/mobile/{program_id}/claims"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.partnero.com/pub/v1/mobile/{program_id}/claims")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partnero.com/pub/v1/mobile/{program_id}/claims")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 1,
"data": {
"status": "claimed",
"app_user_id": "user_8f2k"
}
}
{
"status": 0,
"message": "Code not found"
}
{
"status": 0,
"message": "Claim window closed"
}
Endpoint
POST https://api.partnero.com/pub/v1/mobile/{program_id}/claims
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
| Parameter | Type | Required | Description |
|---|---|---|---|
program_id | string | Yes | Your Program ID, the same one as in your PartneroJS snippet |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
app_user_id | string | Yes | Your ID for the user, the same one your purchases are reported under. Becomes the customer’s key. Must be an email address, or letters, numbers, -, _ and . |
code | string | Without click_id | The partner’s referral link key or promotion code. Up to 100 characters: letters, numbers, ., _ and - |
click_id | string | Without code | The click from an app link, the partnero_click value. Up to 32 letters and numbers. With a code, it’s linked only if it belongs to the code’s partner |
code_type | string | No | link for a referral link key, promotion_code for a promotion code, or auto (default) to try both |
platform | string | No | ios, android or other |
first_seen_at | string | No | When the user first opened the app, as ISO 8601. Needed for the program’s claim window; without it, the window isn’t applied |
Request
cURL
curl --location 'https://api.partnero.com/pub/v1/mobile/YOUR_PROGRAM_ID/claims' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"app_user_id": "user_8f2k",
"code": "DANIEL20",
"platform": "ios",
"first_seen_at": "2026-11-04T09:30:00Z"
}'
Response
{
"status": 1,
"data": {
"status": "claimed",
"app_user_id": "user_8f2k"
}
}
{
"status": 0,
"message": "Code not found"
}
{
"status": 0,
"message": "Claim window closed"
}
data.status is one of:
| Value | Meaning |
|---|---|
claimed | A customer was created for the app user and linked to the partner |
already_claimed | The app user is already a customer. Nothing changed |
Errors
Errors return"status": 0 and a message.
| HTTP status | When |
|---|---|
400 | Invalid input. errors lists the fields, for example a missing app_user_id or a malformed code |
404 | No approved, active partner has this code or click, the Program ID is unknown, or mobile app claims are off. The message is Code not found in every case |
409 | Code belongs to more than one partner: pass code_type to say which kind of code the user entered. Or Claim window closed: the user first opened the app more days ago than the program’s claim window |
429 | More than 30 claims a minute from one IP for the program. Try again in a minute |
Usage notes
- First claim wins. A user is linked to one partner only. Later claims for the same
app_user_id, with any code, returnalready_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_codeandpartnero_clickand claim after sign-in. Retry when the request fails with a network error, a429or a5xx. - 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.
Was this page helpful?
