---
title: Delete Permission From Account
slug: single-connect-api-3-0-3/delete-permission-from-account
description: Learn how to make a DELETE request using cURL command effortlessly with this code example. Understand how to send the request to a specified URL and include the required headers and data for a seamless API integration.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "EKUJV48PWqTCeSiBGWahx",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\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}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>You can delete permission from SAPM account if you are allowed to. You should send SAPM account's dbId and permission to delete in form \"user group id\" : \"permission type\" .</p>",
    "examples": {
      "languages": [
        {
          "id": "QQAvr1zvgHGFbXI5-rItx",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Vsyr1wJWpT4yuRtjUygJ7",
          "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/sc/sapm/deletePermissionFromAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "sJSupyjPFFrvSZMvE8S2q",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\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\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "yVNoYo1f57-rjoaxZwODU",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "QQAvr1zvgHGFbXI5-rItx"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}