audience.preferences.set
curl --request POST \
--url https://platform.trylath.com/audience/preferences/set \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"email": {
"topics": {},
"unsubscribeAll": true
},
"sms": {
"topics": {},
"unsubscribeAll": true
}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
email: {topics: {}, unsubscribeAll: true},
sms: {topics: {}, unsubscribeAll: true}
})
};
fetch('https://platform.trylath.com/audience/preferences/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/audience/preferences/set"
payload = {
"token": "<string>",
"email": {
"topics": {},
"unsubscribeAll": True
},
"sms": {
"topics": {},
"unsubscribeAll": True
}
}
headers = {"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/audience/preferences/set"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"email\": {\n \"topics\": {},\n \"unsubscribeAll\": true\n },\n \"sms\": {\n \"topics\": {},\n \"unsubscribeAll\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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": {
"activityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectName": "<string>",
"email": "<string>",
"phone": "<string>",
"channels": {
"email": {
"topics": [
{
"key": "<string>",
"name": "<string>",
"description": "<string>",
"subscribed": true
}
],
"unsubscribedAll": true,
"suppressionReason": "<string>"
},
"sms": {
"topics": [
{
"key": "<string>",
"name": "<string>",
"description": "<string>",
"subscribed": true
}
],
"unsubscribedAll": true,
"suppressionReason": "<string>"
}
}
}
}audience.preferences.set
Public, for the hosted preferences page and one-click unsubscribe: given the token from a message’s link, subscribes or unsubscribes the contact per topic on either channel, or unsubscribes from all marketing on one. Every change is an appended consent record naming the preference page as its source. Subscribing here is the only thing that lifts a bounce or complaint suppression, because the token proves the person holds the address.
POST
/
audience
/
preferences
/
set
audience.preferences.set
curl --request POST \
--url https://platform.trylath.com/audience/preferences/set \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"email": {
"topics": {},
"unsubscribeAll": true
},
"sms": {
"topics": {},
"unsubscribeAll": true
}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
email: {topics: {}, unsubscribeAll: true},
sms: {topics: {}, unsubscribeAll: true}
})
};
fetch('https://platform.trylath.com/audience/preferences/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/audience/preferences/set"
payload = {
"token": "<string>",
"email": {
"topics": {},
"unsubscribeAll": True
},
"sms": {
"topics": {},
"unsubscribeAll": True
}
}
headers = {"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/audience/preferences/set"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"email\": {\n \"topics\": {},\n \"unsubscribeAll\": true\n },\n \"sms\": {\n \"topics\": {},\n \"unsubscribeAll\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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": {
"activityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectName": "<string>",
"email": "<string>",
"phone": "<string>",
"channels": {
"email": {
"topics": [
{
"key": "<string>",
"name": "<string>",
"description": "<string>",
"subscribed": true
}
],
"unsubscribedAll": true,
"suppressionReason": "<string>"
},
"sms": {
"topics": [
{
"key": "<string>",
"name": "<string>",
"description": "<string>",
"subscribed": true
}
],
"unsubscribedAll": true,
"suppressionReason": "<string>"
}
}
}
}Headers
Replays the stored response for the same key and input; refuses different input.
Body
application/json
Last modified on September 13, 2026
Was this page helpful?

