Create a click
curl --request POST \
--url https://platform.tolt.com/v2/clicks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"link_id": "lnk_mtTeeckFa1vMdvDFXretQNs6",
"page": "https://example.com/pricing?ref=sam",
"referrer": "https://partner.example.com",
"country": "US",
"device": "desktop"
}
'import requests
url = "https://platform.tolt.com/v2/clicks"
payload = {
"link_id": "lnk_mtTeeckFa1vMdvDFXretQNs6",
"page": "https://example.com/pricing?ref=sam",
"referrer": "https://partner.example.com",
"country": "US",
"device": "desktop"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
link_id: 'lnk_mtTeeckFa1vMdvDFXretQNs6',
page: 'https://example.com/pricing?ref=sam',
referrer: 'https://partner.example.com',
country: 'US',
device: 'desktop'
})
};
fetch('https://platform.tolt.com/v2/clicks', 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://platform.tolt.com/v2/clicks",
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([
'link_id' => 'lnk_mtTeeckFa1vMdvDFXretQNs6',
'page' => 'https://example.com/pricing?ref=sam',
'referrer' => 'https://partner.example.com',
'country' => 'US',
'device' => 'desktop'
]),
CURLOPT_HTTPHEADER => [
"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://platform.tolt.com/v2/clicks"
payload := strings.NewReader("{\n \"link_id\": \"lnk_mtTeeckFa1vMdvDFXretQNs6\",\n \"page\": \"https://example.com/pricing?ref=sam\",\n \"referrer\": \"https://partner.example.com\",\n \"country\": \"US\",\n \"device\": \"desktop\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://platform.tolt.com/v2/clicks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"link_id\": \"lnk_mtTeeckFa1vMdvDFXretQNs6\",\n \"page\": \"https://example.com/pricing?ref=sam\",\n \"referrer\": \"https://partner.example.com\",\n \"country\": \"US\",\n \"device\": \"desktop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.tolt.com/v2/clicks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"link_id\": \"lnk_mtTeeckFa1vMdvDFXretQNs6\",\n \"page\": \"https://example.com/pricing?ref=sam\",\n \"referrer\": \"https://partner.example.com\",\n \"country\": \"US\",\n \"device\": \"desktop\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully created click",
"data": {
"id": "clk_mEsbFYv6ZjqXjAoFwokjS6v6",
"page": "https://example.com/pricing?ref=sam",
"referrer": "https://partner.example.com",
"device": "desktop",
"browser": null,
"country": "US",
"state": null,
"link_id": "lnk_mtTeeckFa1vMdvDFXretQNs6",
"program_id": "prg_T6z8aRW3XCmvFWP972RKxpAd",
"partner_id": "part_NLYzgNKuSuASvrvoxNtau6SY",
"created_at": "2026-10-01T12:00:00Z",
"updated_at": "2026-10-01T12:00:00Z"
}
}{
"success": false,
"message": "request: Invalid input: expected object, received null",
"code": "validation_error",
"doc_url": "https://docs.tolt.com/errors#validation_error",
"errors": [
{
"field": "request",
"message": "Invalid input: expected object, received null"
}
]
}{
"success": false,
"message": "Unauthorized",
"code": "unauthorized",
"doc_url": "https://docs.tolt.com/errors#unauthorized"
}{
"success": false,
"message": "Request body exceeds 1 MB",
"code": "payload_too_large",
"doc_url": "https://docs.tolt.com/errors#payload_too_large"
}{
"success": false,
"message": "Too many requests. Retry after the window resets.",
"code": "rate_limited",
"doc_url": "https://docs.tolt.com/errors#rate_limited"
}Clicks
Create a click
Records a click on a partner’s link from your own server, for visits the browser script cannot see. Identify the source by link_id, by partner_id with an optional link_id, or by the link’s param and value; the partner and program are resolved from it. Pass the returned id as click_id when you create the customer.
POST
/
v2
/
clicks
Create a click
curl --request POST \
--url https://platform.tolt.com/v2/clicks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"link_id": "lnk_mtTeeckFa1vMdvDFXretQNs6",
"page": "https://example.com/pricing?ref=sam",
"referrer": "https://partner.example.com",
"country": "US",
"device": "desktop"
}
'import requests
url = "https://platform.tolt.com/v2/clicks"
payload = {
"link_id": "lnk_mtTeeckFa1vMdvDFXretQNs6",
"page": "https://example.com/pricing?ref=sam",
"referrer": "https://partner.example.com",
"country": "US",
"device": "desktop"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
link_id: 'lnk_mtTeeckFa1vMdvDFXretQNs6',
page: 'https://example.com/pricing?ref=sam',
referrer: 'https://partner.example.com',
country: 'US',
device: 'desktop'
})
};
fetch('https://platform.tolt.com/v2/clicks', 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://platform.tolt.com/v2/clicks",
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([
'link_id' => 'lnk_mtTeeckFa1vMdvDFXretQNs6',
'page' => 'https://example.com/pricing?ref=sam',
'referrer' => 'https://partner.example.com',
'country' => 'US',
'device' => 'desktop'
]),
CURLOPT_HTTPHEADER => [
"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://platform.tolt.com/v2/clicks"
payload := strings.NewReader("{\n \"link_id\": \"lnk_mtTeeckFa1vMdvDFXretQNs6\",\n \"page\": \"https://example.com/pricing?ref=sam\",\n \"referrer\": \"https://partner.example.com\",\n \"country\": \"US\",\n \"device\": \"desktop\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://platform.tolt.com/v2/clicks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"link_id\": \"lnk_mtTeeckFa1vMdvDFXretQNs6\",\n \"page\": \"https://example.com/pricing?ref=sam\",\n \"referrer\": \"https://partner.example.com\",\n \"country\": \"US\",\n \"device\": \"desktop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.tolt.com/v2/clicks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"link_id\": \"lnk_mtTeeckFa1vMdvDFXretQNs6\",\n \"page\": \"https://example.com/pricing?ref=sam\",\n \"referrer\": \"https://partner.example.com\",\n \"country\": \"US\",\n \"device\": \"desktop\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully created click",
"data": {
"id": "clk_mEsbFYv6ZjqXjAoFwokjS6v6",
"page": "https://example.com/pricing?ref=sam",
"referrer": "https://partner.example.com",
"device": "desktop",
"browser": null,
"country": "US",
"state": null,
"link_id": "lnk_mtTeeckFa1vMdvDFXretQNs6",
"program_id": "prg_T6z8aRW3XCmvFWP972RKxpAd",
"partner_id": "part_NLYzgNKuSuASvrvoxNtau6SY",
"created_at": "2026-10-01T12:00:00Z",
"updated_at": "2026-10-01T12:00:00Z"
}
}{
"success": false,
"message": "request: Invalid input: expected object, received null",
"code": "validation_error",
"doc_url": "https://docs.tolt.com/errors#validation_error",
"errors": [
{
"field": "request",
"message": "Invalid input: expected object, received null"
}
]
}{
"success": false,
"message": "Unauthorized",
"code": "unauthorized",
"doc_url": "https://docs.tolt.com/errors#unauthorized"
}{
"success": false,
"message": "Request body exceeds 1 MB",
"code": "payload_too_large",
"doc_url": "https://docs.tolt.com/errors#payload_too_large"
}{
"success": false,
"message": "Too many requests. Retry after the window resets.",
"code": "rate_limited",
"doc_url": "https://docs.tolt.com/errors#rate_limited"
}Body
application/json
Identify the click by one of link_id, partner_id, or param and value together. A request with none of them, or with only one of param and value, returns 400.

