curl --request POST \
--url https://platform.trylath.com/email/domain/tracking/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opens": true,
"clicks": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domainId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', opens: true, clicks: true})
};
fetch('https://platform.trylath.com/email/domain/tracking/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/email/domain/tracking/set"
payload = {
"domainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opens": True,
"clicks": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/email/domain/tracking/set"
payload := strings.NewReader("{\n \"domainId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"opens\": true,\n \"clicks\": true\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))
}{
"activityId": "<string>",
"result": {
"domain": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"tracking": {
"opens": true,
"clicks": true,
"applied": true
}
}
}
}email.domain.tracking.set
Sets whether mail from this domain counts opens and clicks, for mail sent from now on. Opens add a 1×1 image; clicks send each http(s) link through Lath, which records the first click and redirects to the original. The first of each sets openedAt or clickedAt on the message and emits email.opened or email.clicked. Both are off by default. Sign-in and account mail is never tracked, and unsubscribe links are never rewritten. An open is an image load: mail apps that block images never count, and ones that prefetch images count opens nobody made.
curl --request POST \
--url https://platform.trylath.com/email/domain/tracking/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opens": true,
"clicks": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domainId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', opens: true, clicks: true})
};
fetch('https://platform.trylath.com/email/domain/tracking/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/email/domain/tracking/set"
payload = {
"domainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opens": True,
"clicks": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/email/domain/tracking/set"
payload := strings.NewReader("{\n \"domainId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"opens\": true,\n \"clicks\": true\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))
}{
"activityId": "<string>",
"result": {
"domain": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"tracking": {
"opens": true,
"clicks": true,
"applied": true
}
}
}
}Authorizations
A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser.
Headers
Replays the stored response for the same key and input; refuses different input.
Body
Was this page helpful?

