---
title: Delete Approved User From Account
slug: single-connect-api-3-2-0/delete-approved-user-from-account
description: Learn how to make a DELETE request using curl with JSON headers and a request body in JSON format with this helpful code example. Explore how to send and accept JSON data to a specific URL effortlessly. Improve your programming skills now!
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "cYv4rn-KxTkZuzg22MiB-",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/DeleteApprovedUserFromAccount",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"dbId\":86389,\n\t\"userName\":\"user1\"\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This API allows you to delete a user with her username from the list of approved user list of the SAPM group you sent dbId of. You can use this API if you are allowed to.",
    "examples": {
      "languages": [
        {
          "id": "K2kuQtv0uzkpbLhYlzR2X",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/DeleteApprovedUserFromAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "J82vLJ9Re2DiGxhK7zb70",
          "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/DeleteApprovedUserFromAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "6KpiKSG4m1m82ZQ6_cCTn",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/DeleteApprovedUserFromAccount\")\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": "9IfiAUnmrUTvxHvh7wsU2",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/DeleteApprovedUserFromAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "K2kuQtv0uzkpbLhYlzR2X"
    },
    "results": {
      "languages": [
        {
          "id": "in3E6WDTJCRcAoTwv8pT4",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "in3E6WDTJCRcAoTwv8pT4"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}