Skip to main content
PUT
/
networks
/
trafficcontrols
/
{controlId}
Update Traffic Control
curl --request PUT \
  --url https://api.eflow.team/v1/networks/trafficcontrols/{controlId} \
  --header 'Content-Type: application/json' \
  --header 'X-Eflow-Api-Key: <api-key>' \
  --data '
{
  "network_traffic_control_id": 1,
  "name": "Block Bad Sources",
  "status": "active",
  "control_type": "blacklist",
  "targeting_action": "block",
  "comparison_method": "exact_match",
  "is_apply_all_affiliates": false,
  "is_apply_all_offers": false,
  "variables": [
    "source_id",
    "sub3"
  ],
  "network_offer_ids": [
    5
  ],
  "network_affiliate_ids": [
    7,
    14,
    21
  ],
  "network_advertiser_ids": [],
  "values": [
    "bad_source_1",
    "bad_source_2"
  ]
}
'
{
  "network_traffic_control_id": 1,
  "network_id": 1,
  "name": "Block Bad Sources",
  "status": "active",
  "is_apply_all_affiliates": false,
  "is_apply_all_offers": false,
  "control_type": "blacklist",
  "targeting_action": "block",
  "date_valid_from": "",
  "date_valid_to": "",
  "comparison_method": "exact_match",
  "variables": [
    "source_id",
    "sub3"
  ],
  "time_created": 1774721611,
  "time_saved": 1774721633,
  "relationship": {
    "network_offer_ids": [
      5
    ],
    "network_affiliate_ids": [
      7,
      14,
      21
    ],
    "network_advertiser_ids": null,
    "values": [
      "bad_source_1",
      "bad_source_2"
    ]
  }
}

Authorizations

X-Eflow-Api-Key
string
header
required

The Everflow API key generated from the Control Center > Security.

Path Parameters

controlId
integer
required

The unique traffic control ID to update.

Body

application/json
network_traffic_control_id
integer
required

The ID of the traffic control to update.

name
string
required

Name of the traffic control.

status
enum<string>
required

Status of the traffic control. Can be one of the following values: active or inactive.

Available options:
active,
inactive
control_type
enum<string>
required

Traffic controls can be either whitelist or blacklist.

Available options:
blacklist,
whitelist
targeting_action
enum<string>
required

The targeting action can be either block or fail_traffic.

Available options:
block,
fail_traffic
comparison_method
enum<string>
required

Defines how the variables will be compared.

Available options:
exact_match,
contains,
begins_with,
ends_with,
does_not_contain,
does_not_match,
is_empty
is_apply_all_affiliates
boolean
required

When this is false, the network_affiliate_ids array must be filled.

is_apply_all_offers
boolean
required

When this is false, the network_offer_ids or network_advertiser_ids array must be filled.

variables
enum<string>[]
required

The click variable that will be looked up and compared to the values supplied. Can be one or multiple values among: sub1, sub2, sub3, sub4, sub5, source_id, referrer, isp, ip, user_agent, country, tracking_domain.

Available options:
sub1,
sub2,
sub3,
sub4,
sub5,
source_id,
referrer,
isp,
ip,
user_agent,
country,
tracking_domain
values
string[]
required

The values that the traffic control will filter. Limited to 3000 values when using exact_match and 100 values otherwise. Please note that when using a whitelist, all values besides the ones specified here will be blocked / sent to fail traffic.

network_offer_ids
integer[]

The offers IDs that will be affected by the traffic control (only relevant when is_apply_all_offers is set to false).

network_affiliate_ids
integer[]

The affiliate IDs that will be affected by the traffic control (only relevant when is_apply_all_affiliates is set to false).

network_advertiser_ids
integer[]

The advertiser IDs that will be affected by the traffic control (only relevant when is_apply_all_offers is set to false). All offers for the specified advertiser IDs will be affected.

date_valid_from
string

An optional start date after which the traffic control will be enforced. Use the YYYY-MM-DD format.

date_valid_to
string

An optional end date after which the traffic control will no longer be enforced. Use the YYYY-MM-DD format.

Response

network_traffic_control_id
integer

Unique traffic control ID.

network_id
integer

Network ID.

name
string

Name of the traffic control.

status
enum<string>

Status of the traffic control.

Available options:
active,
inactive
control_type
enum<string>

Traffic controls can be either whitelist or blacklist.

Available options:
blacklist,
whitelist
targeting_action
enum<string>

The targeting action.

Available options:
block,
fail_traffic
is_apply_all_offers
boolean

Whether this control applies to all offers.

is_apply_all_affiliates
boolean

Whether this control applies to all affiliates.

comparison_method
enum<string>

Defines how the variables are compared.

Available options:
exact_match,
contains,
begins_with,
ends_with,
does_not_contain,
does_not_match,
is_empty
variables
enum<string>[]

The click variable that will be looked up and compared to the values supplied. Can be one or multiple values among: sub1, sub2, sub3, sub4, sub5, source_id, referrer, isp, ip, user_agent, country, tracking_domain. Note: variables and values are only populated by the Get by ID endpoint.

Available options:
sub1,
sub2,
sub3,
sub4,
sub5,
source_id,
referrer,
isp,
ip,
user_agent,
country,
tracking_domain
relationship
object

Related entities associated with this traffic control.

date_valid_from
string

Start date for the control's validity period (YYYY-MM-DD).

date_valid_to
string

End date for the control's validity period (YYYY-MM-DD).

time_created
integer

Unix timestamp of creation.

Example:

1734455015

time_saved
integer

Unix timestamp of last update.

Example:

1734455015