> ## Documentation Index
> Fetch the complete documentation index at: https://developers.everflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Traffic Control

> Update an existing traffic control. This is a full object replacement.




## OpenAPI

````yaml openapi/traffic-controls.yaml put /networks/trafficcontrols/{controlId}
openapi: 3.0.3
info:
  title: Everflow Network API - Traffic Controls
  description: >
    Endpoints for managing network-level traffic controls. Traffic controls are
    rules that filter incoming traffic based on variables like device type, geo,
    or referrer — they help block fraudulent or low-quality traffic before it
    reaches your offers. For a full overview, see the [Traffic Controls
    guide](https://helpdesk.everflow.io/customer/traffic-controls).
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
security: []
tags:
  - name: Traffic Controls
paths:
  /networks/trafficcontrols/{controlId}:
    put:
      tags:
        - Traffic Controls
      summary: Update Traffic Control
      description: |
        Update an existing traffic control. This is a full object replacement.
      parameters:
        - in: path
          name: controlId
          required: true
          schema:
            type: integer
          description: The unique traffic control ID to update.
      requestBody:
        required: true
        content:
          application/json:
            example:
              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
            schema:
              type: object
              required:
                - network_traffic_control_id
                - name
                - status
                - control_type
                - targeting_action
                - comparison_method
                - is_apply_all_affiliates
                - is_apply_all_offers
                - variables
                - values
              properties:
                network_traffic_control_id:
                  type: integer
                  description: The ID of the traffic control to update.
                name:
                  type: string
                  description: Name of the traffic control.
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                  description: >
                    Status of the traffic control. Can be one of the following
                    values: active or inactive.
                control_type:
                  type: string
                  enum:
                    - blacklist
                    - whitelist
                  description: Traffic controls can be either `whitelist` or `blacklist`.
                targeting_action:
                  type: string
                  enum:
                    - block
                    - fail_traffic
                  description: >-
                    The targeting action can be either `block` or
                    `fail_traffic`.
                comparison_method:
                  type: string
                  enum:
                    - exact_match
                    - contains
                    - begins_with
                    - ends_with
                    - does_not_contain
                    - does_not_match
                    - is_empty
                  description: Defines how the variables will be compared.
                is_apply_all_affiliates:
                  type: boolean
                  description: >
                    When this is false, the `network_affiliate_ids` array must
                    be filled.
                is_apply_all_offers:
                  type: boolean
                  description: >
                    When this is false, the `network_offer_ids` or
                    `network_advertiser_ids` array must be filled.
                variables:
                  type: array
                  items:
                    type: string
                    enum:
                      - sub1
                      - sub2
                      - sub3
                      - sub4
                      - sub5
                      - sub6
                      - sub7
                      - sub8
                      - sub9
                      - sub10
                      - source_id
                      - referrer
                      - isp
                      - ip
                      - user_agent
                      - country
                      - tracking_domain
                  description: >
                    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`, `sub6`, `sub7`,
                    `sub8`, `sub9`, `sub10`, `source_id`, `referrer`, `isp`,
                    `ip`, `user_agent`, `country`, `tracking_domain`.
                values:
                  type: array
                  items:
                    type: string
                  description: >
                    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:
                  type: array
                  items:
                    type: integer
                  description: >
                    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:
                  type: array
                  items:
                    type: integer
                  description: >
                    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:
                  type: array
                  items:
                    type: integer
                  description: >
                    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:
                  type: string
                  description: >
                    An optional start date after which the traffic control will
                    be enforced. Use the YYYY-MM-DD format.
                date_valid_to:
                  type: string
                  description: >
                    An optional end date after which the traffic control will no
                    longer be enforced. Use the YYYY-MM-DD format.
      responses:
        '200':
          description: ''
          content:
            application/json:
              example:
                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
              schema:
                $ref: '#/components/schemas/TrafficControl'
        '404':
          description: Traffic control not found.
      security:
        - API Key: []
components:
  schemas:
    TrafficControl:
      type: object
      properties:
        network_traffic_control_id:
          type: integer
          description: Unique traffic control ID.
        network_id:
          type: integer
          description: Network ID.
        name:
          type: string
          description: Name of the traffic control.
        status:
          type: string
          enum:
            - active
            - inactive
          description: Status of the traffic control.
        control_type:
          type: string
          enum:
            - blacklist
            - whitelist
          description: Traffic controls can be either whitelist or blacklist.
        targeting_action:
          type: string
          enum:
            - block
            - fail_traffic
          description: The targeting action.
        is_apply_all_offers:
          type: boolean
          description: Whether this control applies to all offers.
        is_apply_all_affiliates:
          type: boolean
          description: Whether this control applies to all affiliates.
        comparison_method:
          type: string
          enum:
            - exact_match
            - contains
            - begins_with
            - ends_with
            - does_not_contain
            - does_not_match
            - is_empty
          description: Defines how the variables are compared.
        variables:
          type: array
          items:
            type: string
            enum:
              - sub1
              - sub2
              - sub3
              - sub4
              - sub5
              - sub6
              - sub7
              - sub8
              - sub9
              - sub10
              - source_id
              - referrer
              - isp
              - ip
              - user_agent
              - country
              - tracking_domain
          description: >
            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`, `sub6`, `sub7`, `sub8`, `sub9`, `sub10`,
            `source_id`, `referrer`, `isp`, `ip`, `user_agent`, `country`,
            `tracking_domain`. Note: `variables` and `values` are only populated
            by the Get by ID endpoint.
        relationship:
          type: object
          description: Related entities associated with this traffic control.
          properties:
            network_offer_ids:
              type: array
              items:
                type: integer
              nullable: true
              description: Offer IDs this control applies to.
            network_affiliate_ids:
              type: array
              items:
                type: integer
              nullable: true
              description: Affiliate IDs this control applies to.
            network_advertiser_ids:
              type: array
              items:
                type: integer
              nullable: true
              description: Advertiser IDs this control applies to.
            values:
              type: array
              items:
                type: string
              description: >
                The blocked/allowed values. Only returned by the Find by ID
                endpoint.
        date_valid_from:
          type: string
          description: Start date for the control's validity period (YYYY-MM-DD).
        date_valid_to:
          type: string
          description: End date for the control's validity period (YYYY-MM-DD).
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp of creation.
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp of last update.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````