Frequency Cap
Set Frequency Cap
Limit how many marketing emails one contact receives
PUT
/
api
/
v1
/
frequency-cap
Set Frequency Cap
curl --request PUT \
--url https://api.sequenzy.com/api/v1/frequency-cap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"maxEmails": 123,
"windowHours": 123
}
'import requests
url = "https://api.sequenzy.com/api/v1/frequency-cap"
payload = {
"maxEmails": 123,
"windowHours": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({maxEmails: 123, windowHours: 123})
};
fetch('https://api.sequenzy.com/api/v1/frequency-cap', 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.sequenzy.com/api/v1/frequency-cap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'maxEmails' => 123,
'windowHours' => 123
]),
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://api.sequenzy.com/api/v1/frequency-cap"
payload := strings.NewReader("{\n \"maxEmails\": 123,\n \"windowHours\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sequenzy.com/api/v1/frequency-cap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"maxEmails\": 123,\n \"windowHours\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/frequency-cap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maxEmails\": 123,\n \"windowHours\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"frequencyCap": {
"maxEmails": 1,
"windowHours": 16
}
}
{
"error": "maxEmails must be an integer from 1 to 50"
}
{
"error": "You have view-only access to this company. Contact the owner to request edit permissions."
}
Set or replace your company frequency cap. It applies from the next email step
onward in sequences with
A
frequencyCapEnabled; turn that on with
Create Sequence or
Update Sequence. Sequences that don’t opt in
are never capped.
Emails already sent or queued in the window count, so a new cap can skip the
next step for contacts who were recently emailed.
Requires the companies:manage scope and owner or admin access.
Request
curl -X PUT "https://api.sequenzy.com/api/v1/frequency-cap" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "maxEmails": 1, "windowHours": 16 }'
Body
integer
required
Most marketing emails one contact may receive in the window, from 1 to 50.
integer
required
Rolling window in hours, from 1 to 168.
Response fields
object
The saved cap, with
maxEmails and windowHours.{
"success": true,
"frequencyCap": {
"maxEmails": 1,
"windowHours": 16
}
}
{
"error": "maxEmails must be an integer from 1 to 50"
}
{
"error": "You have view-only access to this company. Contact the owner to request edit permissions."
}
400 is returned when either field is missing, not a whole number or out of
range. Nothing is saved, so fix the value and retry.⌘I
Set Frequency Cap
curl --request PUT \
--url https://api.sequenzy.com/api/v1/frequency-cap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"maxEmails": 123,
"windowHours": 123
}
'import requests
url = "https://api.sequenzy.com/api/v1/frequency-cap"
payload = {
"maxEmails": 123,
"windowHours": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({maxEmails: 123, windowHours: 123})
};
fetch('https://api.sequenzy.com/api/v1/frequency-cap', 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.sequenzy.com/api/v1/frequency-cap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'maxEmails' => 123,
'windowHours' => 123
]),
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://api.sequenzy.com/api/v1/frequency-cap"
payload := strings.NewReader("{\n \"maxEmails\": 123,\n \"windowHours\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sequenzy.com/api/v1/frequency-cap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"maxEmails\": 123,\n \"windowHours\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/frequency-cap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maxEmails\": 123,\n \"windowHours\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"frequencyCap": {
"maxEmails": 1,
"windowHours": 16
}
}
{
"error": "maxEmails must be an integer from 1 to 50"
}
{
"error": "You have view-only access to this company. Contact the owner to request edit permissions."
}