---
updatedAt: 2026-08-01T11:27:25.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Update Site/Zone Targeting

## Why Update Site/Zone Targeting?

You may find it useful to make updates and changes to an existing flight that has been targeted for a specific site or zone. The Update Site/Zone Targeting API endpoint enables you to update the details of site/zone targeting for a flight using the `PUT` verb to make changes to an existing site/zone targeting.

## API Syntax

When using the Update Site/Zone Targeting API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`PUT https://api.kevel.co/v1/flight/{FlightID}/sitezonetargeting/{SiteZoneTargetingID}`

Where:

* `PUT` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v1` - the API version.
* `flight` - the API endpoint being called.
* `FlightID` - the ID associated with the flight.
* `sitezonetargeting` -
* `SiteZoneTargetingID` - the ID associated with the site/zone used for targeting.

> 📘 Clearing attribute values
>
> To unset or clear an attribute, set its value to `NULL`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/flight/{FlightID}/sitezonetargeting/{SiteZoneTargetingID}": {
      "put": {
        "summary": "Update Site/Zone Targeting",
        "description": "",
        "operationId": "update-sitezone-targeting",
        "parameters": [
          {
            "name": "FlightID",
            "in": "path",
            "description": "The ID of the Flight",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "SiteZoneTargetingID",
            "in": "path",
            "description": "ID of the Site/Zone Targeting parameter. You can pull it through the Get Flight endpoint if don't have.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "SiteID": {
                    "type": "integer",
                    "description": "ID of the Site",
                    "format": "int32"
                  },
                  "ZoneID": {
                    "type": "integer",
                    "description": "ID of the Zone",
                    "format": "int32"
                  },
                  "isExclude": {
                    "type": "boolean",
                    "description": "Whether you want to include or exclude",
                    "default": "false"
                  }
                }
              },
              "examples": {
                "JSON": {
                  "value": {
                    "FlightId": 12345,
                    "SiteId": 678,
                    "ZoneId": 910,
                    "IsExclude": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"Id\":98765,\n  \"FlightId\":12345,\n  \"SiteId\":678,\n  \"ZoneId\":910,\n  \"IsExclude\":false\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Id": {
                      "type": "integer",
                      "example": 98765,
                      "default": 0
                    },
                    "FlightId": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "SiteId": {
                      "type": "integer",
                      "example": 678,
                      "default": 0
                    },
                    "ZoneId": {
                      "type": "integer",
                      "example": 910,
                      "default": 0
                    },
                    "IsExclude": {
                      "type": "boolean",
                      "example": false,
                      "default": "false"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X PUT -H 'X-Adzerk-ApiKey:<APIKEY>' -H \"Content-Type:application/json\" \"https://api.kevel.co/v1/flight/12345/sitezonetargeting/98765\" --data-binary '{\"FlightId\":12345,\"SiteId\":678,\"ZoneId\":910,\"IsExclude\":false}'"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function updateSiteZoneTargeting() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let siteZoneTargeting = await client.run(\"siteZoneTargeting\", \"update\", {\n    id: 98765,\n    flightId: 12345,\n    isExclude: false,\n  });\n\n  console.log(siteZoneTargeting);\n}\n\nupdateSiteZoneTargeting();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef update_site_zone_targeting()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    flight_id = 123456\n    id = 987654\n    data = client.sitezonetargetings.get(flight_id, id)\n    data[:is_exclude] = true\n    pp client.sitezonetargetings.update(flight_id, id, data)\nend\nupdate_site_zone_targeting()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```