curl --request POST \
--url https://app.utmkit.co/api/v1/conversions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"event_id": "<string>",
"currency": "<string>",
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}
'import requests
url = "https://app.utmkit.co/api/v1/conversions"
payload = {
"customer_id": "<string>",
"event_id": "<string>",
"currency": "<string>",
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}
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({
customer_id: '<string>',
event_id: '<string>',
currency: '<string>',
kind: '<string>',
link: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
value: '<string>'
})
};
fetch('https://app.utmkit.co/api/v1/conversions', 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://app.utmkit.co/api/v1/conversions",
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([
'customer_id' => '<string>',
'event_id' => '<string>',
'currency' => '<string>',
'kind' => '<string>',
'link' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'value' => '<string>'
]),
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://app.utmkit.co/api/v1/conversions"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"kind\": \"<string>\",\n \"link\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"value\": \"<string>\"\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://app.utmkit.co/api/v1/conversions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"kind\": \"<string>\",\n \"link\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.utmkit.co/api/v1/conversions")
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 \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"kind\": \"<string>\",\n \"link\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"attributed_by": "reference",
"currency": "<string>",
"customer_id": "<string>",
"duplicate": true,
"event_id": "<string>",
"id": 123,
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}{
"attributed_by": "reference",
"currency": "<string>",
"customer_id": "<string>",
"duplicate": true,
"event_id": "<string>",
"id": 123,
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}Report a conversion against one of the workspace's links
Requires a token with the conversions:write permission.
curl --request POST \
--url https://app.utmkit.co/api/v1/conversions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"event_id": "<string>",
"currency": "<string>",
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}
'import requests
url = "https://app.utmkit.co/api/v1/conversions"
payload = {
"customer_id": "<string>",
"event_id": "<string>",
"currency": "<string>",
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}
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({
customer_id: '<string>',
event_id: '<string>',
currency: '<string>',
kind: '<string>',
link: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
value: '<string>'
})
};
fetch('https://app.utmkit.co/api/v1/conversions', 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://app.utmkit.co/api/v1/conversions",
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([
'customer_id' => '<string>',
'event_id' => '<string>',
'currency' => '<string>',
'kind' => '<string>',
'link' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'value' => '<string>'
]),
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://app.utmkit.co/api/v1/conversions"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"kind\": \"<string>\",\n \"link\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"value\": \"<string>\"\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://app.utmkit.co/api/v1/conversions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"kind\": \"<string>\",\n \"link\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.utmkit.co/api/v1/conversions")
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 \"customer_id\": \"<string>\",\n \"event_id\": \"<string>\",\n \"currency\": \"<string>\",\n \"kind\": \"<string>\",\n \"link\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"attributed_by": "reference",
"currency": "<string>",
"customer_id": "<string>",
"duplicate": true,
"event_id": "<string>",
"id": 123,
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}{
"attributed_by": "reference",
"currency": "<string>",
"customer_id": "<string>",
"duplicate": true,
"event_id": "<string>",
"id": 123,
"kind": "<string>",
"link": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"value": "<string>"
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}Authorizations
utmk_, minted on /tokens
Body
Conversion input
One result the customer's server reports (spec 046). link is the _link value the landing URL carried and is required on a customer's first conversion; afterwards the binding answers.
The customer's identifier in the caller's own system
1 - 128The caller's identifier for this event; a repeat is a retry
1 - 128Three letters, shape only; kept as given, never converted
purchase, signup, lead, or a word of the customer's own
32<host>/<short_code>, exactly the _link value the landing URL carried
When it happened. Defaults to now; refused far in the future or past
Decimal string, >= 0. Requires currency
^\d+(\.\d+)?$Response
Conversion (a retry, already recorded)
A recorded conversion. attributed_by says how the link was found on a 201; duplicate: true marks the 200 a retry gets.