---
title: Delete User Groups
slug: single-connect-api-3-2-0/delete-user-groups
description: Learn how to perform a DELETE request using the curl command with headers and data included, as illustrated in this code example. Take your URL manipulation and deletion capabilities to the next level with this handy tutorial.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "mYVr9gxi34g3W5Qb6W1XF",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/user/deleteUserGroups",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "[\"eb0deb5e-ceb1-429b-a015-3045064d29dd\"]",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "You can delete user groups by sending the user group's id.",
    "examples": {
      "languages": [
        {
          "id": "0sN4R5WdQB4Q1BXFSWYhc",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/user/deleteUserGroups \\\n     --header 'accept: application/json'"
        },
        {
          "id": "-IXmwssF0K8KKdCBBIOWK",
          "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/user/deleteUserGroups\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "M89PnzX2IiyOJNDLgPYI0",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/deleteUserGroups\")\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": "rEc4dr0Z2i8gGwc7A3fT6",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/user/deleteUserGroups\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "0sN4R5WdQB4Q1BXFSWYhc"
    },
    "results": {
      "languages": [
        {
          "id": "F6N2rWt_Hi4S2CEdwvc_X",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "F6N2rWt_Hi4S2CEdwvc_X"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}