---
title: Delete Users
slug: single-connect-api-3-2-0/delete-users
description: Learn how to delete user data using the DELETE request method and a specified URL in this code example. This tutorial provides a curl command with necessary headers for JSON data exchange. The request body features a string parameter to ensure a precise d
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "z143THDCZwiT2dV51V9PW",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/user/deleteUsers",
    "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[\"ddb490e4-54b1-4c02-a4d9-b896cfb486a8\"]\n",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Delete Users",
        "jsonExample": "true"
      }
    ],
    "contentType": "application/json",
    "description": "This method deletes a chosen user in Single Connect.\n\nEnter the user id in \"Body\" field.",
    "examples": {
      "languages": [
        {
          "id": "Uk7bCWk3gXiwSfo6qWDLf",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/user/deleteUsers \\\n     --header 'accept: application/json'"
        },
        {
          "id": "TqGj-HeWbRrAxYUDrejPc",
          "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/deleteUsers\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "pU7Re8KFYB_gtOeC3QBD0",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/deleteUsers\")\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": "P3YSOoXI0cxlf3Q6qjCrw",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/user/deleteUsers\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Uk7bCWk3gXiwSfo6qWDLf"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "true"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}