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 leads and sign-ups
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 Referrals section as Leads).
_fprom_tid (_fprom_track for accounts created prior to April 2021) cookie value(which keeps the tracking id and referral identification) on your server and send it along with the sign-up data through the tid parameter. Alternative: In some special cases, you can refer sign ups directly to a promoter, by passing the referral id through ref_id parameter. Be careful when using this because the referral id can be modified by the promoter by default, however you can disable that from the campaign configuration page.
POST https://api.firstpromoter.com/api/v2/track/signupcurl --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"
}Authorizations
API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys
Headers
Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations
Body
- Option 1
- Option 2
Email of the lead/sign-up. Required if uid is not provided.
ID to match the sale with the lead if the email can be changed before the first sale. Required if email is not provided.
Visitor tracking ID. It's set when the visitor tracking script tracks the referral visit on our system. The value is found inside _fprom_tid cookie. Required if ref_id is not provided.
Default referral id of the promoter. Use this only when you want to assign the lead to a specific promoter. Required if tid is not provided.
IP of the visitor who generated the sign up. It's used for fraud analysis.
ISO date string of the date of the signup event
Set this to true to skip email notifications. Default is false.
Response
Successful signup response
45831611
"signup"
null
null
null
null
null
null
"2025-04-25T09:29:51.973Z"
Show child attributes
Show child attributes
[]