---
title: Delete a cross-project Holdout
slug: feature-experimentation/api/delete-a-cross-project-holdout
docTags: 
createdAt: 2026-10-13T18:16:15.508Z
---

{
  "id": "RthjmuiScfSG90lshAjFb",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.optimizely.com/flags/v1//holdouts/{holdout_id}",
    "servers": [
      {
        "url": "https://api.optimizely.com/flags/v1//holdouts/{holdout_id}"
      }
    ],
    "name": "Delete a cross-project Holdout",
    "description": "<p>Permanently deletes a holdout and all its cross-project target associations.\nOnly holdouts in draft state can be deleted. Holdouts in running or\nconcluded state cannot be deleted.</p>\n<p>Requires FLAGS_ADMIN permission on all projects targeted by the holdout.</p>\n<p>Gated behind the <code>holdouts-m2</code> feature flag.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "holdout_id",
          "type": "integer",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "apiKey",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        },
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "description": "Write applications that authenticate with the REST API via OAuth 2.0.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://app.optimizely.com/oauth2/authorize",
              "tokenUrl": "https://app.optimizely.com/oauth2/token",
              "scopes": {
                "all": "Grants all access"
              }
            }
          },
          "requiredScopes": [
            "read",
            "write"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "Holdout successfully deleted",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Malformed requests and invalid parameter names and types",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Invalid credentials",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Do not have permission to perform the operation",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not found. No content",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "P-2YS3GlrTAMCOxq6iwQk",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.optimizely.com/flags/v1//holdouts/{holdout_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "UzQ6pCW2sw1qunU8_Fro5",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.optimizely.com/flags/v1//holdouts/{holdout_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "pGqNdQk5iDIMLxgCBFzuk",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.optimizely.com/flags/v1//holdouts/{holdout_id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "3T9Ufrznam9o5pubDcRVt",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.optimizely.com/flags/v1//holdouts/{holdout_id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "P-2YS3GlrTAMCOxq6iwQk"
    },
    "results": {
      "languages": [
        {
          "id": "PB2N82q9FOBIVlRoZSoe9",
          "language": "204",
          "code": "// Holdout successfully deleted\n"
        },
        {
          "id": "0LJswtDD0a6pS2E0bPPZk",
          "language": "400",
          "code": "// Malformed requests and invalid parameter names and types\n"
        },
        {
          "id": "S8ei53kb1INPFGfdUijof",
          "language": "401",
          "code": "// Invalid credentials\n"
        },
        {
          "id": "xbrcmCrxLj03JluC_-kMG",
          "language": "403",
          "code": "// Do not have permission to perform the operation\n"
        },
        {
          "id": "r4AS5saIBYa0xq4jukU5M",
          "language": "404",
          "code": "// Not found. No content\n"
        }
      ],
      "selectedLanguageId": "PB2N82q9FOBIVlRoZSoe9"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}