---
title: Delete a pinned collection
slug: graph/api/delete-a-pinned-collection
docTags: 
createdAt: 2026-08-28T18:28:55.472Z
---

{
  "id": "55by2RCHzck-jQ4GzQCQ1",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://cg.optimizely.com/api/pinned/collections/{collectionId}",
    "servers": [
      {
        "url": "https://cg.optimizely.com/api/pinned/collections/{collectionId}"
      }
    ],
    "name": "Delete a pinned collection",
    "description": "Delete pinned collection by Id",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "collectionId",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "epi-hmac",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>HMAC authentication (<code>epi-hmac xxx</code>)</p>",
          "in": "header"
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "description": "JWT token",
          "scheme": "bearer"
        },
        {
          "id": "Basic",
          "name": "Basic",
          "kind": "optional",
          "type": "http",
          "description": "HMAC credentials",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "No content",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "PbEad-KEKyt7p3onGkXXI",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://cg.optimizely.com/api/pinned/collections/{collectionId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Hg5fQKsebtKso-LS6VCcV",
          "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://cg.optimizely.com/api/pinned/collections/{collectionId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "uibKMH490mKn4Zo5AuWAt",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://cg.optimizely.com/api/pinned/collections/{collectionId}\")\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": "xxZgddIqFZ_Pdl0nRIDcO",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://cg.optimizely.com/api/pinned/collections/{collectionId}\"\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": "PbEad-KEKyt7p3onGkXXI"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// No content\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}