---
title: Delete Policy Key
slug: single-connect-api-3-0-3/delete-policy-key
description: Learn how to use the cURL command to make a DELETE request to a specific URL in this helpful document. Discover how to delete a policy key by providing a JSON body parameter, ensuring efficient management of your data.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "o23i1HH_ucEZ6lPBO8QVv",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/policy/deletePolicyKey",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{   \n\t\"dbId\": 379291\n} ",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Delete Policy Key",
        "jsonExample": "Success"
      }
    ],
    "contentType": "application/json",
    "description": "This method deletes an existing policy key by referring to its dbId.\n\ndbId is mandatory field to delete the related policy key.",
    "examples": {
      "languages": [
        {
          "id": "qw0EJK9RC3JC-0lkl-PGH",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/policy/deletePolicyKey \\\n     --header 'accept: application/json'"
        },
        {
          "id": "6TtLIpUoLVFqcC_yt72AZ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/policy/deletePolicyKey\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "oon8gy5oYBwg2tEkYLjh9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/deletePolicyKey\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "viL3WRV2fhF6NBVZVc5Oh",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/deletePolicyKey\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "qw0EJK9RC3JC-0lkl-PGH"
    },
    "results": {
      "languages": [
        {
          "id": "2_0g2ogOhbh_fRT4eb3Nk",
          "language": "200",
          "code": "Success"
        }
      ],
      "selectedLanguageId": "2_0g2ogOhbh_fRT4eb3Nk"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}