---
title: Delete Users
slug: single-connect-api-3-0-3/delete-users
description: Learn how to delete users using curl with this comprehensive code example. The provided code includes all the required headers and data to seamlessly execute the deletion process. Master the technique and effortlessly manage user deletion with curl.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "5K8tBVYinmESVgBHWNbpp",
  "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": "qYrio7_sVho_oChAAbjSA",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/user/deleteUsers \\\n     --header 'accept: application/json'"
        },
        {
          "id": "OYz10ZlOH1S8syYcf7W2Z",
          "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": "IQDYekJUZXvUS1IC7s-H6",
          "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": "5If7_tO18_AUIK-Gg8IFQ",
          "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": "qYrio7_sVho_oChAAbjSA"
    },
    "results": {
      "languages": [
        {
          "id": "i6Xj2mL-yvwKD7eZAEJ6-",
          "language": "200",
          "code": "true"
        }
      ],
      "selectedLanguageId": "i6Xj2mL-yvwKD7eZAEJ6-"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}