Update Website Settings
curl --request POST \
--url https://api.aimtell.com/prod/site/{id}/settings \
--header 'Content-Type: application/json' \
--header 'X-Authorization-Api-Key: <api-key>' \
--data '
{
"collect_ip": 1,
"collect_ip_as_attribute": 0,
"collect_suburl": 0,
"collect_ua_as_attribute": 1,
"track_clicks_as_events": 0,
"track_subscribe_as_event": 0,
"retention_length": "30",
"frequency_cap": 15
}
'import requests
url = "https://api.aimtell.com/prod/site/{id}/settings"
payload = {
"collect_ip": 1,
"collect_ip_as_attribute": 0,
"collect_suburl": 0,
"collect_ua_as_attribute": 1,
"track_clicks_as_events": 0,
"track_subscribe_as_event": 0,
"retention_length": "30",
"frequency_cap": 15
}
headers = {
"X-Authorization-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Authorization-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collect_ip: 1,
collect_ip_as_attribute: 0,
collect_suburl: 0,
collect_ua_as_attribute: 1,
track_clicks_as_events: 0,
track_subscribe_as_event: 0,
retention_length: '30',
frequency_cap: 15
})
};
fetch('https://api.aimtell.com/prod/site/{id}/settings', 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.aimtell.com/prod/site/{id}/settings",
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([
'collect_ip' => 1,
'collect_ip_as_attribute' => 0,
'collect_suburl' => 0,
'collect_ua_as_attribute' => 1,
'track_clicks_as_events' => 0,
'track_subscribe_as_event' => 0,
'retention_length' => '30',
'frequency_cap' => 15
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization-Api-Key: <api-key>"
],
]);
$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.aimtell.com/prod/site/{id}/settings"
payload := strings.NewReader("{\n \"collect_ip\": 1,\n \"collect_ip_as_attribute\": 0,\n \"collect_suburl\": 0,\n \"collect_ua_as_attribute\": 1,\n \"track_clicks_as_events\": 0,\n \"track_subscribe_as_event\": 0,\n \"retention_length\": \"30\",\n \"frequency_cap\": 15\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Authorization-Api-Key", "<api-key>")
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.aimtell.com/prod/site/{id}/settings")
.header("X-Authorization-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collect_ip\": 1,\n \"collect_ip_as_attribute\": 0,\n \"collect_suburl\": 0,\n \"collect_ua_as_attribute\": 1,\n \"track_clicks_as_events\": 0,\n \"track_subscribe_as_event\": 0,\n \"retention_length\": \"30\",\n \"frequency_cap\": 15\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/site/{id}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Authorization-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collect_ip\": 1,\n \"collect_ip_as_attribute\": 0,\n \"collect_suburl\": 0,\n \"collect_ua_as_attribute\": 1,\n \"track_clicks_as_events\": 0,\n \"track_subscribe_as_event\": 0,\n \"retention_length\": \"30\",\n \"frequency_cap\": 15\n}"
response = http.request(request)
puts response.read_body{
"result": "success",
"message": "Updated site settings"
}{
"result": "error",
"message": "Error #136."
}{
"result": "error",
"message": "Please specify a valid auth_token."
}Settings
Update Website Settings
Update a Website’s Tracking Settings
POST
/
prod
/
site
/
{id}
/
settings
Update Website Settings
curl --request POST \
--url https://api.aimtell.com/prod/site/{id}/settings \
--header 'Content-Type: application/json' \
--header 'X-Authorization-Api-Key: <api-key>' \
--data '
{
"collect_ip": 1,
"collect_ip_as_attribute": 0,
"collect_suburl": 0,
"collect_ua_as_attribute": 1,
"track_clicks_as_events": 0,
"track_subscribe_as_event": 0,
"retention_length": "30",
"frequency_cap": 15
}
'import requests
url = "https://api.aimtell.com/prod/site/{id}/settings"
payload = {
"collect_ip": 1,
"collect_ip_as_attribute": 0,
"collect_suburl": 0,
"collect_ua_as_attribute": 1,
"track_clicks_as_events": 0,
"track_subscribe_as_event": 0,
"retention_length": "30",
"frequency_cap": 15
}
headers = {
"X-Authorization-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Authorization-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collect_ip: 1,
collect_ip_as_attribute: 0,
collect_suburl: 0,
collect_ua_as_attribute: 1,
track_clicks_as_events: 0,
track_subscribe_as_event: 0,
retention_length: '30',
frequency_cap: 15
})
};
fetch('https://api.aimtell.com/prod/site/{id}/settings', 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.aimtell.com/prod/site/{id}/settings",
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([
'collect_ip' => 1,
'collect_ip_as_attribute' => 0,
'collect_suburl' => 0,
'collect_ua_as_attribute' => 1,
'track_clicks_as_events' => 0,
'track_subscribe_as_event' => 0,
'retention_length' => '30',
'frequency_cap' => 15
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization-Api-Key: <api-key>"
],
]);
$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.aimtell.com/prod/site/{id}/settings"
payload := strings.NewReader("{\n \"collect_ip\": 1,\n \"collect_ip_as_attribute\": 0,\n \"collect_suburl\": 0,\n \"collect_ua_as_attribute\": 1,\n \"track_clicks_as_events\": 0,\n \"track_subscribe_as_event\": 0,\n \"retention_length\": \"30\",\n \"frequency_cap\": 15\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Authorization-Api-Key", "<api-key>")
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.aimtell.com/prod/site/{id}/settings")
.header("X-Authorization-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collect_ip\": 1,\n \"collect_ip_as_attribute\": 0,\n \"collect_suburl\": 0,\n \"collect_ua_as_attribute\": 1,\n \"track_clicks_as_events\": 0,\n \"track_subscribe_as_event\": 0,\n \"retention_length\": \"30\",\n \"frequency_cap\": 15\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/site/{id}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Authorization-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collect_ip\": 1,\n \"collect_ip_as_attribute\": 0,\n \"collect_suburl\": 0,\n \"collect_ua_as_attribute\": 1,\n \"track_clicks_as_events\": 0,\n \"track_subscribe_as_event\": 0,\n \"retention_length\": \"30\",\n \"frequency_cap\": 15\n}"
response = http.request(request)
puts response.read_body{
"result": "success",
"message": "Updated site settings"
}{
"result": "error",
"message": "Error #136."
}{
"result": "error",
"message": "Please specify a valid auth_token."
}Authorizations
Path Parameters
Site ID
Body
application/json
Allow collection of IP Address (0 = false, 1 = true)
Automatically track IP address as a custom attribute (0 = false, 1 = true)
Automatically track subscription URL as custom attribute (0 = false, 1 = true)
Automatically track User Agent as custom attribute (0 = false, 1 = true)
Automatically track notification clicks as custom events. (0 = false, 1 = true)
Automatically track subscriptions as custom events. (0 = false, 1 = true)
Number of days to keep data for deleted subscribers
Max number of notifications a subscriber can receive per day
Response
200
⌘I

