---
title: Delete Permission From Account
slug: kron-pam-api-collection-381-patch3/delete-permission-from-account
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "l_eykTb4uQHAqF6ys9Q-y",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>Delete permissions from a Vault account by sending the <code>sapmdbId</code> and the permissions to delete in the format of <code>user group id: permission type</code>.</p>\n<ul>\n<li>\n<p><strong>sapmdbId</strong>: ID of the Vault account.</p>\n</li>\n<li>\n<p><strong>permissionToDelete</strong>: Array of permissions to delete, each containing <code>userGroupId</code> and <code>permission</code>.</p>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\r\n    \"sapmDbId\": 3589891,\r\n    \"permissionToDelete\": [\r\n        {\r\n            \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n            \"permission\": \"FULL_CONTROL\"\r\n        },\r\n        {\r\n            \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n            \"permission\": \"FULL_CONTROL\"\r\n        }\r\n    ]\r\n}",
          "value": "{\r\n    \"sapmDbId\": 3589891,\r\n    \"permissionToDelete\": [\r\n        {\r\n            \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n            \"permission\": \"FULL_CONTROL\"\r\n        },\r\n        {\r\n            \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n            \"permission\": \"FULL_CONTROL\"\r\n        }\r\n    ]\r\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "99wfRXlngChWPoMbq8GrT",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\r\\n    \\\"sapmDbId\\\": 3589891,\\r\\n    \\\"permissionToDelete\\\": [\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"98b592a0-0ff6-40bc-804b-1c0030a5695e\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"fe9bfde2-9530-4768-868c-6af5d16303a1\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        }\\r\\n    ]\\r\\n}\"'"
        },
        {
          "id": "yty-vgBgSJ06FAsWJ_fF1",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\r\\n    \\\"sapmDbId\\\": 3589891,\\r\\n    \\\"permissionToDelete\\\": [\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"98b592a0-0ff6-40bc-804b-1c0030a5695e\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"fe9bfde2-9530-4768-868c-6af5d16303a1\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        }\\r\\n    ]\\r\\n}\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "1RNdLH98Y3r0xtPPFjxbs",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\r\\n    \\\"sapmDbId\\\": 3589891,\\r\\n    \\\"permissionToDelete\\\": [\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"98b592a0-0ff6-40bc-804b-1c0030a5695e\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"fe9bfde2-9530-4768-868c-6af5d16303a1\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        }\\r\\n    ]\\r\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "m4tZlT3DEb8P7BgylxO8Q",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount\"\n\npayload = json.dumps(\"{\\r\\n    \\\"sapmDbId\\\": 3589891,\\r\\n    \\\"permissionToDelete\\\": [\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"98b592a0-0ff6-40bc-804b-1c0030a5695e\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"userGroupId\\\": \\\"fe9bfde2-9530-4768-868c-6af5d16303a1\\\",\\r\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\"\\r\\n        }\\r\\n    ]\\r\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "99wfRXlngChWPoMbq8GrT"
    },
    "results": {
      "languages": [
        {
          "id": "CNB88HmaM4jeP_SwQrvhf",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "CNB88HmaM4jeP_SwQrvhf"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}