cURL
curl --request POST \
--url https://api.firstpromoter.com/api/v2/track/signup \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"uid": "<string>",
"tid": "<string>",
"ref_id": "<string>",
"ip": "<string>",
"created_at": "<string>",
"skip_email_notification": true
}
'import requests
url = "https://api.firstpromoter.com/api/v2/track/signup"
payload = {
"email": "<string>",
"uid": "<string>",
"tid": "<string>",
"ref_id": "<string>",
"ip": "<string>",
"created_at": "<string>",
"skip_email_notification": True
}
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Account-ID': '<account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '<string>',
uid: '<string>',
tid: '<string>',
ref_id: '<string>',
ip: '<string>',
created_at: '<string>',
skip_email_notification: true
})
};
fetch('https://api.firstpromoter.com/api/v2/track/signup', 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.firstpromoter.com/api/v2/track/signup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'uid' => '<string>',
'tid' => '<string>',
'ref_id' => '<string>',
'ip' => '<string>',
'created_at' => '<string>',
'skip_email_notification' => true
]),
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.firstpromoter.com/api/v2/track/signup"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"uid\": \"<string>\",\n \"tid\": \"<string>\",\n \"ref_id\": \"<string>\",\n \"ip\": \"<string>\",\n \"created_at\": \"<string>\",\n \"skip_email_notification\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.firstpromoter.com/api/v2/track/signup")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"uid\": \"<string>\",\n \"tid\": \"<string>\",\n \"ref_id\": \"<string>\",\n \"ip\": \"<string>\",\n \"created_at\": \"<string>\",\n \"skip_email_notification\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/track/signup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"uid\": \"<string>\",\n \"tid\": \"<string>\",\n \"ref_id\": \"<string>\",\n \"ip\": \"<string>\",\n \"created_at\": \"<string>\",\n \"skip_email_notification\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 45831611,
"etype": "signup",
"sale_amount": null,
"original_sale_amount": null,
"original_sale_currency": null,
"event_id": null,
"plan_id": null,
"billing_period": null,
"created_at": "2025-04-25T09:29:51.973Z",
"referral": {
"id": 29203686,
"email": "testme@test1.com",
"uid": null
},
"commissions": []
}{
"message": "Error. Email and uid can not be blank!"
}{
"message": "Visitor invalid, not found or you are trying to use the signup tracking test via API which doesn't work on API calls."
}{
"transaction_id": "there is already a signup event registered on this lead"
}Tracking Api
Tracking leads and sign-ups
Track a lead or signup from your backend and attribute it to a promoter using the visitor’s tid or ref_id.
POST
/
signup
cURL
curl --request POST \
--url https://api.firstpromoter.com/api/v2/track/signup \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"uid": "<string>",
"tid": "<string>",
"ref_id": "<string>",
"ip": "<string>",
"created_at": "<string>",
"skip_email_notification": true
}
'import requests
url = "https://api.firstpromoter.com/api/v2/track/signup"
payload = {
"email": "<string>",
"uid": "<string>",
"tid": "<string>",
"ref_id": "<string>",
"ip": "<string>",
"created_at": "<string>",
"skip_email_notification": True
}
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Account-ID': '<account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '<string>',
uid: '<string>',
tid: '<string>',
ref_id: '<string>',
ip: '<string>',
created_at: '<string>',
skip_email_notification: true
})
};
fetch('https://api.firstpromoter.com/api/v2/track/signup', 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.firstpromoter.com/api/v2/track/signup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'uid' => '<string>',
'tid' => '<string>',
'ref_id' => '<string>',
'ip' => '<string>',
'created_at' => '<string>',
'skip_email_notification' => true
]),
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.firstpromoter.com/api/v2/track/signup"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"uid\": \"<string>\",\n \"tid\": \"<string>\",\n \"ref_id\": \"<string>\",\n \"ip\": \"<string>\",\n \"created_at\": \"<string>\",\n \"skip_email_notification\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.firstpromoter.com/api/v2/track/signup")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"uid\": \"<string>\",\n \"tid\": \"<string>\",\n \"ref_id\": \"<string>\",\n \"ip\": \"<string>\",\n \"created_at\": \"<string>\",\n \"skip_email_notification\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/track/signup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"uid\": \"<string>\",\n \"tid\": \"<string>\",\n \"ref_id\": \"<string>\",\n \"ip\": \"<string>\",\n \"created_at\": \"<string>\",\n \"skip_email_notification\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 45831611,
"etype": "signup",
"sale_amount": null,
"original_sale_amount": null,
"original_sale_currency": null,
"event_id": null,
"plan_id": null,
"billing_period": null,
"created_at": "2025-04-25T09:29:51.973Z",
"referral": {
"id": 29203686,
"email": "testme@test1.com",
"uid": null
},
"commissions": []
}{
"message": "Error. Email and uid can not be blank!"
}{
"message": "Visitor invalid, not found or you are trying to use the signup tracking test via API which doesn't work on API calls."
}{
"transaction_id": "there is already a signup event registered on this lead"
}Capture a lead when they sign-up or fill an optin form. This endpoint is used to track leads and sign-ups. It’s not for tracking the actual sales and commissions.
Sign-ups are tracked as leads in FirstPromoter so when a person referred by the promoter/affiliate signs up, a new referral should be added inside FirstPromoter (you can see them inside the
Sign-ups are tracked as leads in FirstPromoter so when a person referred by the promoter/affiliate signs up, a new referral should be added inside FirstPromoter (you can see them inside the
Referrals section as Leads). Using sub IDs, postbacks or ad tracking? Install the tracking script so it sets the
_fprom_tid cookie when a visitor clicks a referral link, then send that cookie’s value in the tid parameter.Authorizations
Headers
Body
application/json
- Option 1
- Option 2
Response
Successful signup response