curl --request POST \
--url https://api.eflow.team/v1/networks/usm/rules \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"name": "High-LTV bonus",
"status": "active",
"start_date": "2026-09-01",
"end_date": "2026-12-31",
"network_offer_ids": [
1
],
"network_advertiser_ids": [],
"network_affiliate_ids": [],
"aggregation_level": "user_affiliate_offer",
"period": "monthly",
"network_offer_payout_revenue_id": 915,
"trigger_type": "recurring",
"time_window_duration": 30,
"goals": [
{
"metric": "data_point",
"metric_data_point_identifier": "ltv_90d",
"metric_aggr_function": "sum",
"operator": "greater_than",
"value_numeric": 250
},
{
"metric": "data_point",
"metric_data_point_identifier": "plan_tier",
"metric_aggr_function": "current",
"operator": "exact_match",
"value_string": "premium"
}
],
"is_payout_enabled": true,
"payout_action": "flat_increase",
"payout_value": 10,
"payout_type": "cpa",
"payout_percentage": 0,
"is_revenue_enabled": false,
"revenue_action": "unknown",
"revenue_value": 0,
"revenue_type": "blank",
"revenue_percentage": 0
}
'import requests
url = "https://api.eflow.team/v1/networks/usm/rules"
payload = {
"name": "High-LTV bonus",
"status": "active",
"start_date": "2026-09-01",
"end_date": "2026-12-31",
"network_offer_ids": [1],
"network_advertiser_ids": [],
"network_affiliate_ids": [],
"aggregation_level": "user_affiliate_offer",
"period": "monthly",
"network_offer_payout_revenue_id": 915,
"trigger_type": "recurring",
"time_window_duration": 30,
"goals": [
{
"metric": "data_point",
"metric_data_point_identifier": "ltv_90d",
"metric_aggr_function": "sum",
"operator": "greater_than",
"value_numeric": 250
},
{
"metric": "data_point",
"metric_data_point_identifier": "plan_tier",
"metric_aggr_function": "current",
"operator": "exact_match",
"value_string": "premium"
}
],
"is_payout_enabled": True,
"payout_action": "flat_increase",
"payout_value": 10,
"payout_type": "cpa",
"payout_percentage": 0,
"is_revenue_enabled": False,
"revenue_action": "unknown",
"revenue_value": 0,
"revenue_type": "blank",
"revenue_percentage": 0
}
headers = {
"X-Eflow-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-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'High-LTV bonus',
status: 'active',
start_date: '2026-09-01',
end_date: '2026-12-31',
network_offer_ids: [1],
network_advertiser_ids: [],
network_affiliate_ids: [],
aggregation_level: 'user_affiliate_offer',
period: 'monthly',
network_offer_payout_revenue_id: 915,
trigger_type: 'recurring',
time_window_duration: 30,
goals: [
{
metric: 'data_point',
metric_data_point_identifier: 'ltv_90d',
metric_aggr_function: 'sum',
operator: 'greater_than',
value_numeric: 250
},
{
metric: 'data_point',
metric_data_point_identifier: 'plan_tier',
metric_aggr_function: 'current',
operator: 'exact_match',
value_string: 'premium'
}
],
is_payout_enabled: true,
payout_action: 'flat_increase',
payout_value: 10,
payout_type: 'cpa',
payout_percentage: 0,
is_revenue_enabled: false,
revenue_action: 'unknown',
revenue_value: 0,
revenue_type: 'blank',
revenue_percentage: 0
})
};
fetch('https://api.eflow.team/v1/networks/usm/rules', 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.eflow.team/v1/networks/usm/rules",
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([
'name' => 'High-LTV bonus',
'status' => 'active',
'start_date' => '2026-09-01',
'end_date' => '2026-12-31',
'network_offer_ids' => [
1
],
'network_advertiser_ids' => [
],
'network_affiliate_ids' => [
],
'aggregation_level' => 'user_affiliate_offer',
'period' => 'monthly',
'network_offer_payout_revenue_id' => 915,
'trigger_type' => 'recurring',
'time_window_duration' => 30,
'goals' => [
[
'metric' => 'data_point',
'metric_data_point_identifier' => 'ltv_90d',
'metric_aggr_function' => 'sum',
'operator' => 'greater_than',
'value_numeric' => 250
],
[
'metric' => 'data_point',
'metric_data_point_identifier' => 'plan_tier',
'metric_aggr_function' => 'current',
'operator' => 'exact_match',
'value_string' => 'premium'
]
],
'is_payout_enabled' => true,
'payout_action' => 'flat_increase',
'payout_value' => 10,
'payout_type' => 'cpa',
'payout_percentage' => 0,
'is_revenue_enabled' => false,
'revenue_action' => 'unknown',
'revenue_value' => 0,
'revenue_type' => 'blank',
'revenue_percentage' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-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.eflow.team/v1/networks/usm/rules"
payload := strings.NewReader("{\n \"name\": \"High-LTV bonus\",\n \"status\": \"active\",\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-12-31\",\n \"network_offer_ids\": [\n 1\n ],\n \"network_advertiser_ids\": [],\n \"network_affiliate_ids\": [],\n \"aggregation_level\": \"user_affiliate_offer\",\n \"period\": \"monthly\",\n \"network_offer_payout_revenue_id\": 915,\n \"trigger_type\": \"recurring\",\n \"time_window_duration\": 30,\n \"goals\": [\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"ltv_90d\",\n \"metric_aggr_function\": \"sum\",\n \"operator\": \"greater_than\",\n \"value_numeric\": 250\n },\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"plan_tier\",\n \"metric_aggr_function\": \"current\",\n \"operator\": \"exact_match\",\n \"value_string\": \"premium\"\n }\n ],\n \"is_payout_enabled\": true,\n \"payout_action\": \"flat_increase\",\n \"payout_value\": 10,\n \"payout_type\": \"cpa\",\n \"payout_percentage\": 0,\n \"is_revenue_enabled\": false,\n \"revenue_action\": \"unknown\",\n \"revenue_value\": 0,\n \"revenue_type\": \"blank\",\n \"revenue_percentage\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eflow-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.eflow.team/v1/networks/usm/rules")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"High-LTV bonus\",\n \"status\": \"active\",\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-12-31\",\n \"network_offer_ids\": [\n 1\n ],\n \"network_advertiser_ids\": [],\n \"network_affiliate_ids\": [],\n \"aggregation_level\": \"user_affiliate_offer\",\n \"period\": \"monthly\",\n \"network_offer_payout_revenue_id\": 915,\n \"trigger_type\": \"recurring\",\n \"time_window_duration\": 30,\n \"goals\": [\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"ltv_90d\",\n \"metric_aggr_function\": \"sum\",\n \"operator\": \"greater_than\",\n \"value_numeric\": 250\n },\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"plan_tier\",\n \"metric_aggr_function\": \"current\",\n \"operator\": \"exact_match\",\n \"value_string\": \"premium\"\n }\n ],\n \"is_payout_enabled\": true,\n \"payout_action\": \"flat_increase\",\n \"payout_value\": 10,\n \"payout_type\": \"cpa\",\n \"payout_percentage\": 0,\n \"is_revenue_enabled\": false,\n \"revenue_action\": \"unknown\",\n \"revenue_value\": 0,\n \"revenue_type\": \"blank\",\n \"revenue_percentage\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/usm/rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"High-LTV bonus\",\n \"status\": \"active\",\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-12-31\",\n \"network_offer_ids\": [\n 1\n ],\n \"network_advertiser_ids\": [],\n \"network_affiliate_ids\": [],\n \"aggregation_level\": \"user_affiliate_offer\",\n \"period\": \"monthly\",\n \"network_offer_payout_revenue_id\": 915,\n \"trigger_type\": \"recurring\",\n \"time_window_duration\": 30,\n \"goals\": [\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"ltv_90d\",\n \"metric_aggr_function\": \"sum\",\n \"operator\": \"greater_than\",\n \"value_numeric\": 250\n },\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"plan_tier\",\n \"metric_aggr_function\": \"current\",\n \"operator\": \"exact_match\",\n \"value_string\": \"premium\"\n }\n ],\n \"is_payout_enabled\": true,\n \"payout_action\": \"flat_increase\",\n \"payout_value\": 10,\n \"payout_type\": \"cpa\",\n \"payout_percentage\": 0,\n \"is_revenue_enabled\": false,\n \"revenue_action\": \"unknown\",\n \"revenue_value\": 0,\n \"revenue_type\": \"blank\",\n \"revenue_percentage\": 0\n}"
response = http.request(request)
puts response.read_body{
"name": "High-LTV bonus",
"status": "active",
"aggregation_level": "user",
"period": "daily",
"trigger_type": "one_time",
"time_window_duration": 30,
"goals": [
{
"network_usm_rule_goal_id": 123,
"metric": "data_point",
"metric_data_point_identifier": "ltv_90d",
"metric_aggr_function": "sum",
"operator": "greater_than",
"value_numeric": 123,
"value_string": "<string>"
}
],
"network_usm_rule_id": 3,
"network_id": 1,
"start_date": "2026-09-01",
"end_date": "2026-12-31",
"network_offer_ids": [
123
],
"network_advertiser_ids": [
123
],
"network_affiliate_ids": [
123
],
"network_offer_payout_revenue_id": 123,
"is_payout_enabled": true,
"payout_action": "exact",
"payout_value": 123,
"payout_type": "cpa",
"payout_percentage": 123,
"is_revenue_enabled": true,
"revenue_action": "exact",
"revenue_value": 123,
"revenue_type": "rpa",
"revenue_percentage": 123,
"time_created": 1788398644,
"time_saved": 1788398704,
"relationship": {}
}{
"error": "<string>"
}Create Rule
Create a Customer Value rule. See the endpoint page for the combinations of trigger_type, period, payout_action and network_offer_payout_revenue_id that the API rejects.
curl --request POST \
--url https://api.eflow.team/v1/networks/usm/rules \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"name": "High-LTV bonus",
"status": "active",
"start_date": "2026-09-01",
"end_date": "2026-12-31",
"network_offer_ids": [
1
],
"network_advertiser_ids": [],
"network_affiliate_ids": [],
"aggregation_level": "user_affiliate_offer",
"period": "monthly",
"network_offer_payout_revenue_id": 915,
"trigger_type": "recurring",
"time_window_duration": 30,
"goals": [
{
"metric": "data_point",
"metric_data_point_identifier": "ltv_90d",
"metric_aggr_function": "sum",
"operator": "greater_than",
"value_numeric": 250
},
{
"metric": "data_point",
"metric_data_point_identifier": "plan_tier",
"metric_aggr_function": "current",
"operator": "exact_match",
"value_string": "premium"
}
],
"is_payout_enabled": true,
"payout_action": "flat_increase",
"payout_value": 10,
"payout_type": "cpa",
"payout_percentage": 0,
"is_revenue_enabled": false,
"revenue_action": "unknown",
"revenue_value": 0,
"revenue_type": "blank",
"revenue_percentage": 0
}
'import requests
url = "https://api.eflow.team/v1/networks/usm/rules"
payload = {
"name": "High-LTV bonus",
"status": "active",
"start_date": "2026-09-01",
"end_date": "2026-12-31",
"network_offer_ids": [1],
"network_advertiser_ids": [],
"network_affiliate_ids": [],
"aggregation_level": "user_affiliate_offer",
"period": "monthly",
"network_offer_payout_revenue_id": 915,
"trigger_type": "recurring",
"time_window_duration": 30,
"goals": [
{
"metric": "data_point",
"metric_data_point_identifier": "ltv_90d",
"metric_aggr_function": "sum",
"operator": "greater_than",
"value_numeric": 250
},
{
"metric": "data_point",
"metric_data_point_identifier": "plan_tier",
"metric_aggr_function": "current",
"operator": "exact_match",
"value_string": "premium"
}
],
"is_payout_enabled": True,
"payout_action": "flat_increase",
"payout_value": 10,
"payout_type": "cpa",
"payout_percentage": 0,
"is_revenue_enabled": False,
"revenue_action": "unknown",
"revenue_value": 0,
"revenue_type": "blank",
"revenue_percentage": 0
}
headers = {
"X-Eflow-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-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'High-LTV bonus',
status: 'active',
start_date: '2026-09-01',
end_date: '2026-12-31',
network_offer_ids: [1],
network_advertiser_ids: [],
network_affiliate_ids: [],
aggregation_level: 'user_affiliate_offer',
period: 'monthly',
network_offer_payout_revenue_id: 915,
trigger_type: 'recurring',
time_window_duration: 30,
goals: [
{
metric: 'data_point',
metric_data_point_identifier: 'ltv_90d',
metric_aggr_function: 'sum',
operator: 'greater_than',
value_numeric: 250
},
{
metric: 'data_point',
metric_data_point_identifier: 'plan_tier',
metric_aggr_function: 'current',
operator: 'exact_match',
value_string: 'premium'
}
],
is_payout_enabled: true,
payout_action: 'flat_increase',
payout_value: 10,
payout_type: 'cpa',
payout_percentage: 0,
is_revenue_enabled: false,
revenue_action: 'unknown',
revenue_value: 0,
revenue_type: 'blank',
revenue_percentage: 0
})
};
fetch('https://api.eflow.team/v1/networks/usm/rules', 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.eflow.team/v1/networks/usm/rules",
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([
'name' => 'High-LTV bonus',
'status' => 'active',
'start_date' => '2026-09-01',
'end_date' => '2026-12-31',
'network_offer_ids' => [
1
],
'network_advertiser_ids' => [
],
'network_affiliate_ids' => [
],
'aggregation_level' => 'user_affiliate_offer',
'period' => 'monthly',
'network_offer_payout_revenue_id' => 915,
'trigger_type' => 'recurring',
'time_window_duration' => 30,
'goals' => [
[
'metric' => 'data_point',
'metric_data_point_identifier' => 'ltv_90d',
'metric_aggr_function' => 'sum',
'operator' => 'greater_than',
'value_numeric' => 250
],
[
'metric' => 'data_point',
'metric_data_point_identifier' => 'plan_tier',
'metric_aggr_function' => 'current',
'operator' => 'exact_match',
'value_string' => 'premium'
]
],
'is_payout_enabled' => true,
'payout_action' => 'flat_increase',
'payout_value' => 10,
'payout_type' => 'cpa',
'payout_percentage' => 0,
'is_revenue_enabled' => false,
'revenue_action' => 'unknown',
'revenue_value' => 0,
'revenue_type' => 'blank',
'revenue_percentage' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-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.eflow.team/v1/networks/usm/rules"
payload := strings.NewReader("{\n \"name\": \"High-LTV bonus\",\n \"status\": \"active\",\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-12-31\",\n \"network_offer_ids\": [\n 1\n ],\n \"network_advertiser_ids\": [],\n \"network_affiliate_ids\": [],\n \"aggregation_level\": \"user_affiliate_offer\",\n \"period\": \"monthly\",\n \"network_offer_payout_revenue_id\": 915,\n \"trigger_type\": \"recurring\",\n \"time_window_duration\": 30,\n \"goals\": [\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"ltv_90d\",\n \"metric_aggr_function\": \"sum\",\n \"operator\": \"greater_than\",\n \"value_numeric\": 250\n },\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"plan_tier\",\n \"metric_aggr_function\": \"current\",\n \"operator\": \"exact_match\",\n \"value_string\": \"premium\"\n }\n ],\n \"is_payout_enabled\": true,\n \"payout_action\": \"flat_increase\",\n \"payout_value\": 10,\n \"payout_type\": \"cpa\",\n \"payout_percentage\": 0,\n \"is_revenue_enabled\": false,\n \"revenue_action\": \"unknown\",\n \"revenue_value\": 0,\n \"revenue_type\": \"blank\",\n \"revenue_percentage\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eflow-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.eflow.team/v1/networks/usm/rules")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"High-LTV bonus\",\n \"status\": \"active\",\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-12-31\",\n \"network_offer_ids\": [\n 1\n ],\n \"network_advertiser_ids\": [],\n \"network_affiliate_ids\": [],\n \"aggregation_level\": \"user_affiliate_offer\",\n \"period\": \"monthly\",\n \"network_offer_payout_revenue_id\": 915,\n \"trigger_type\": \"recurring\",\n \"time_window_duration\": 30,\n \"goals\": [\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"ltv_90d\",\n \"metric_aggr_function\": \"sum\",\n \"operator\": \"greater_than\",\n \"value_numeric\": 250\n },\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"plan_tier\",\n \"metric_aggr_function\": \"current\",\n \"operator\": \"exact_match\",\n \"value_string\": \"premium\"\n }\n ],\n \"is_payout_enabled\": true,\n \"payout_action\": \"flat_increase\",\n \"payout_value\": 10,\n \"payout_type\": \"cpa\",\n \"payout_percentage\": 0,\n \"is_revenue_enabled\": false,\n \"revenue_action\": \"unknown\",\n \"revenue_value\": 0,\n \"revenue_type\": \"blank\",\n \"revenue_percentage\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/usm/rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"High-LTV bonus\",\n \"status\": \"active\",\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-12-31\",\n \"network_offer_ids\": [\n 1\n ],\n \"network_advertiser_ids\": [],\n \"network_affiliate_ids\": [],\n \"aggregation_level\": \"user_affiliate_offer\",\n \"period\": \"monthly\",\n \"network_offer_payout_revenue_id\": 915,\n \"trigger_type\": \"recurring\",\n \"time_window_duration\": 30,\n \"goals\": [\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"ltv_90d\",\n \"metric_aggr_function\": \"sum\",\n \"operator\": \"greater_than\",\n \"value_numeric\": 250\n },\n {\n \"metric\": \"data_point\",\n \"metric_data_point_identifier\": \"plan_tier\",\n \"metric_aggr_function\": \"current\",\n \"operator\": \"exact_match\",\n \"value_string\": \"premium\"\n }\n ],\n \"is_payout_enabled\": true,\n \"payout_action\": \"flat_increase\",\n \"payout_value\": 10,\n \"payout_type\": \"cpa\",\n \"payout_percentage\": 0,\n \"is_revenue_enabled\": false,\n \"revenue_action\": \"unknown\",\n \"revenue_value\": 0,\n \"revenue_type\": \"blank\",\n \"revenue_percentage\": 0\n}"
response = http.request(request)
puts response.read_body{
"name": "High-LTV bonus",
"status": "active",
"aggregation_level": "user",
"period": "daily",
"trigger_type": "one_time",
"time_window_duration": 30,
"goals": [
{
"network_usm_rule_goal_id": 123,
"metric": "data_point",
"metric_data_point_identifier": "ltv_90d",
"metric_aggr_function": "sum",
"operator": "greater_than",
"value_numeric": 123,
"value_string": "<string>"
}
],
"network_usm_rule_id": 3,
"network_id": 1,
"start_date": "2026-09-01",
"end_date": "2026-12-31",
"network_offer_ids": [
123
],
"network_advertiser_ids": [
123
],
"network_affiliate_ids": [
123
],
"network_offer_payout_revenue_id": 123,
"is_payout_enabled": true,
"payout_action": "exact",
"payout_value": 123,
"payout_type": "cpa",
"payout_percentage": 123,
"is_revenue_enabled": true,
"revenue_action": "exact",
"revenue_value": 123,
"revenue_type": "rpa",
"revenue_percentage": 123,
"time_created": 1788398644,
"time_saved": 1788398704,
"relationship": {}
}{
"error": "<string>"
}usm in the path comes from.
A rule has three parts:
- Scope — which offers, advertisers and partners it applies to (
network_offer_ids,network_advertiser_ids,network_affiliate_ids; leave an array empty to apply to all), how customer activity is grouped (aggregation_level), and over what window (period,time_window_duration). - Goals — the conditions on the customer’s aggregated values. All goals must match. Set
metrictodata_pointand name your data point inmetric_data_point_identifier, or use a built-in metric such asrevenue,payout,conversion,eventorsale_amount. - Action — how payout and/or revenue change when the goals are met (
is_payout_enabled,payout_action, and the revenue equivalents).
time_window_duration is the number of days of customer history the rule looks back over, and must be greater than 0.
Rule combinations
A rule’s trigger, period and action have to agree with each other. These combinations are rejected:| Request | Response |
|---|---|
trigger_type: one_time with a resetting period (daily, weekly, monthly, quarterly) | 'one_time' trigger type can't be used with a recurring period — use global or since_user_sign_up |
trigger_type: one_time without payout_action: exact and payout_type: cpa | Payout action must be 'exact' and payout type 'cpa' when using trigger type 'one_time' |
network_offer_payout_revenue_id set alongside more than one entry in network_offer_ids | You cannot target a specific event if multiple offers are selected — send 0 for multi-offer rules |
A goal with metric: event while network_offer_payout_revenue_id points at the offer’s base event | An event goal cannot be defined if the selected event is the base event — send 0, or target a non-base event |
payout_action: exact with payout_type: blank | Must define a payout type if payout action is 'exact' — and the same for revenue_action with revenue_type |
Payout and revenue types
A rule’spayout_type accepts cpa, cpc, cpm, cps, cpa_cps and prv; its revenue_type accepts rpa, rpc, rpm, rps and rpa_rps. The SKU variants available on an offer — cpa_sku, cps_sku, rpa_sku and so on — are not supported on rules.
The flat actions (flat_increase, flat_decrease) apply payout_value or revenue_value directly and ignore the type — send blank.
Writing rules needs an API key with Offers → write access. Read-only keys and Reporting-only keys are rejected.Authorizations
The Everflow API key generated from the Control Center > Security.
Body
The rule name shown in the Everflow UI.
"High-LTV bonus"
Whether the rule is evaluated against incoming conversions.
active, inactive How customer activity is grouped before goals are evaluated. user aggregates all of a customer's activity across the network; the compound levels keep a separate total per partner, offer or advertiser.
user, user_offer, user_affiliate, user_advertiser, user_affiliate_offer, user_affiliate_advertiser The window the aggregation resets on. global and since_user_sign_up never reset, and are the only periods allowed with a one_time trigger.
daily, weekly, monthly, quarterly, global, since_user_sign_up Whether the rule fires once per customer (one_time) or every time the goals are met (recurring). one_time requires a non-resetting period, and forces payout_action exact with payout_type cpa.
one_time, recurring How many days of customer history the rule looks back over. Must be greater than 0.
30
The conditions a customer must meet. All goals must match. Replaced wholesale on every update.
Show child attributes
Show child attributes
Date the rule starts applying (format: YYYY-MM-DD).
"2026-09-01"
Date the rule stops applying (format: YYYY-MM-DD).
"2026-12-31"
Offers the rule applies to. Leave empty to apply to all offers.
Advertisers the rule applies to. Leave empty to apply to all advertisers.
Partners the rule applies to. Leave empty to apply to all partners.
Restrict the rule to one specific offer payout/revenue entry (event). Send 0 to apply to every event on the selected offers. Cannot be set when network_offer_ids holds more than one offer.
Whether the rule adjusts partner payout.
How payout is adjusted. exact sets the payout outright, flat_increase and flat_decrease add or subtract payout_value, and increase and decrease apply payout_percentage. Send unknown when is_payout_enabled is false.
exact, increase, decrease, flat_increase, flat_decrease, unknown The flat amount used by exact, flat_increase and flat_decrease.
The payout model the adjusted payout is written as. Rules support these six models; the SKU variants available on an offer (cpa_sku, cps_sku, …) are not supported here.
Required with payout_action: exact (blank is rejected there with Must define a payout type if payout action is 'exact'), and must be cpa for one_time rules. The flat actions apply payout_value directly and ignore it — send blank.
cpa, cpc, cpm, cps, cpa_cps, prv, blank The percentage used by the increase and decrease actions.
Whether the rule adjusts advertiser revenue.
How revenue is adjusted, mirroring payout_action. Send unknown when is_revenue_enabled is false.
exact, increase, decrease, flat_increase, flat_decrease, unknown The flat amount used by exact, flat_increase and flat_decrease.
The revenue model the adjusted revenue is written as. Rules support these five models. Required with revenue_action: exact (blank is rejected there with Must define a revenue type if revenue action is 'exact'); the flat actions ignore it.
rpa, rpc, rpm, rps, rpa_rps, blank The percentage used by the increase and decrease actions.
Response
The rule name shown in the Everflow UI.
"High-LTV bonus"
Whether the rule is evaluated against incoming conversions.
active, inactive How customer activity is grouped before goals are evaluated. user aggregates all of a customer's activity across the network; the compound levels keep a separate total per partner, offer or advertiser.
user, user_offer, user_affiliate, user_advertiser, user_affiliate_offer, user_affiliate_advertiser The window the aggregation resets on. global and since_user_sign_up never reset, and are the only periods allowed with a one_time trigger.
daily, weekly, monthly, quarterly, global, since_user_sign_up Whether the rule fires once per customer (one_time) or every time the goals are met (recurring). one_time requires a non-resetting period, and forces payout_action exact with payout_type cpa.
one_time, recurring How many days of customer history the rule looks back over. Must be greater than 0.
30
The conditions a customer must meet. All goals must match. Replaced wholesale on every update.
Show child attributes
Show child attributes
Unique rule ID.
3
Network ID.
1
Date the rule starts applying (format: YYYY-MM-DD).
"2026-09-01"
Date the rule stops applying (format: YYYY-MM-DD).
"2026-12-31"
Offers the rule applies to. Leave empty to apply to all offers.
Advertisers the rule applies to. Leave empty to apply to all advertisers.
Partners the rule applies to. Leave empty to apply to all partners.
Restrict the rule to one specific offer payout/revenue entry (event). Send 0 to apply to every event on the selected offers. Cannot be set when network_offer_ids holds more than one offer.
Whether the rule adjusts partner payout.
How payout is adjusted. exact sets the payout outright, flat_increase and flat_decrease add or subtract payout_value, and increase and decrease apply payout_percentage. Send unknown when is_payout_enabled is false.
exact, increase, decrease, flat_increase, flat_decrease, unknown The flat amount used by exact, flat_increase and flat_decrease.
The payout model the adjusted payout is written as. Rules support these six models; the SKU variants available on an offer (cpa_sku, cps_sku, …) are not supported here.
Required with payout_action: exact (blank is rejected there with Must define a payout type if payout action is 'exact'), and must be cpa for one_time rules. The flat actions apply payout_value directly and ignore it — send blank.
cpa, cpc, cpm, cps, cpa_cps, prv, blank The percentage used by the increase and decrease actions.
Whether the rule adjusts advertiser revenue.
How revenue is adjusted, mirroring payout_action. Send unknown when is_revenue_enabled is false.
exact, increase, decrease, flat_increase, flat_decrease, unknown The flat amount used by exact, flat_increase and flat_decrease.
The revenue model the adjusted revenue is written as. Rules support these five models. Required with revenue_action: exact (blank is rejected there with Must define a revenue type if revenue action is 'exact'); the flat actions ignore it.
rpa, rpc, rpm, rps, rpa_rps, blank The percentage used by the increase and decrease actions.
Unix timestamp of creation.
1788398644
Unix timestamp of last update.
1788398704
Related objects for the rule.
Was this page helpful?
