---
updatedAt: 2025-09-18T21:59:47.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Delete Flight Segment Targeting Rule

Delete a Flight Segment targeting rule

# 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}/segmenttargeting/{Id}": {
      "delete": {
        "summary": "Delete Flight Segment Targeting Rule",
        "description": "Delete a Flight Segment targeting rule",
        "operationId": "delete-flight-segment",
        "parameters": [
          {
            "name": "FlightId",
            "in": "path",
            "description": "The flight the targeting rule applies to",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "SegmentTargetingId",
            "in": "path",
            "description": "Id of the Flight Segment targeting rule",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "\"Successfully deleted.\""
                  }
                },
                "schema": {
                  "type": "string",
                  "example": "Successfully deleted."
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X DELETE -H \"X-Adzerk-ApiKey:<APIKEY>\" \"https://api.kevel.co/v1/flight/{FlightId}/segmenttargeting/{Id}\""
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function deleteFlightSegment() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let targetingRule = await client.run('flightSegment', 'delete', {\n    flight_id: 12345,\n\t\tid: 456789\n  });\n  console.log(flightSegment);\n}\n\ndeleteFlightSegment();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef delete_flight_segment()\n  \tclient = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n\t  flight_id = 6789\n    id = 12345\n    pp client.segments.delete(flight_id, id)\nend\ndelete_flight_segment()"
            }
          ],
          "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
}
```