---
title: Delete user
slug: organization-api/delete-user
docTags: 
createdAt: 2024-07-01T11:14:05.780Z
---

{
  "id": "uP1jpxx0EwNK1aHdNu1GA",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.catenda.com/v2/scim/v2/Users/{user-id}",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/scim/v2/Users/{user-id}"
      }
    ],
    "name": "Delete user",
    "description": "Delete a SCIM user.\n\nCurrent user must be of organization type.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "user-id",
          "type": "string",
          "description": "Id of the user"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "scim-user",
            "schema": [
              {
                "name": "active",
                "kind": "optional",
                "type": "string",
                "description": "Active state of the user",
                "example": true
              },
              {
                "name": "schemas",
                "kind": "optional",
                "type": "array",
                "description": "List of schemas",
                "example": "[\"urn:ietf:params:scim:schemas:core:2.0:User\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "urn:ietf:params:scim:schemas:core:2.0:User",
                "itemDefault": ""
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "A unique identifier for the user, represented as compacted UUID using 32 hexadecimal characters",
                "example": "2819c223-7f76-453a-919d-413861904646"
              },
              {
                "name": "meta",
                "kind": "optional",
                "type": "object",
                "description": "Meta object for the user",
                "example": "",
                "schema": [
                  {
                    "name": "resourceType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Resource type",
                    "example": "User"
                  },
                  {
                    "name": "created",
                    "kind": "optional",
                    "type": "string",
                    "description": "The date and time the user was created in ISO 8601 format",
                    "example": "2011-08-01T18:29:49.793Z"
                  },
                  {
                    "name": "lastModified",
                    "kind": "optional",
                    "type": "string",
                    "description": "The date and time the user was last modified in ISO 8601 format",
                    "example": "2011-08-01T18:29:49.793Z"
                  },
                  {
                    "name": "location",
                    "kind": "optional",
                    "type": "string",
                    "description": "The location of the user",
                    "example": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
                  },
                  {
                    "name": "version",
                    "kind": "optional",
                    "type": "string",
                    "description": "The version of the user",
                    "example": "W\\/\\\"f250dd84f0671c3\\\""
                  }
                ]
              },
              {
                "name": "userName",
                "kind": "optional",
                "type": "string",
                "description": "Human readable user name",
                "example": "john_smith@example.com"
              },
              {
                "name": "externalId",
                "kind": "optional",
                "type": "string",
                "description": "Identifier of the original source where the user data is taken from",
                "example": "john_smith"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "object",
                "description": "Name object for the user",
                "example": "",
                "schema": [
                  {
                    "name": "formatted",
                    "kind": "optional",
                    "type": "string",
                    "description": "Formatted representation of the user name",
                    "example": "JohnSmith"
                  },
                  {
                    "name": "familyName",
                    "kind": "optional",
                    "type": "string",
                    "description": "The family name of the user",
                    "example": "Smith"
                  },
                  {
                    "name": "givenName",
                    "kind": "optional",
                    "type": "string",
                    "description": "The given name of the user",
                    "example": "John"
                  }
                ]
              },
              {
                "name": "emails",
                "kind": "optional",
                "type": "array",
                "description": "List of emails for the user",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "value",
                    "kind": "optional",
                    "type": "string",
                    "description": "Value of the email address",
                    "example": "john_smith@example.com"
                  },
                  {
                    "name": "primary",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Whether is the primary email address for the user",
                    "example": true
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Category of the email",
                    "example": "work"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/scim-user",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "l9bOfRjXa--FkpXUz7BfO",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.catenda.com/v2/scim/v2/Users/{user-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "J9I8mfbqldAB7RAl5wfay",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/scim/v2/Users/{user-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "NTXT6MeFGISPR0hcI6rYA",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/scim/v2/Users/{user-id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Zmk5Kdid-PAMiFm15mNga",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/scim/v2/Users/{user-id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "l9bOfRjXa--FkpXUz7BfO"
    },
    "results": {
      "languages": [
        {
          "id": "yy2kMisiAA7XiM_2Y0ya6",
          "language": "200",
          "code": "// OK\n{\n  \"active\": true,\n  \"schemas\": [\n    \"urn:ietf:params:scim:schemas:core:2.0:User\"\n  ],\n  \"id\": \"2819c223-7f76-453a-919d-413861904646\",\n  \"meta\": {\n    \"resourceType\": \"User\",\n    \"created\": \"2011-08-01T18:29:49.793Z\",\n    \"lastModified\": \"2011-08-01T18:29:49.793Z\",\n    \"location\": \"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646\",\n    \"version\": \"W\\\\/\\\\\\\"f250dd84f0671c3\\\\\\\"\"\n  },\n  \"userName\": \"john_smith@example.com\",\n  \"externalId\": \"john_smith\",\n  \"name\": {\n    \"formatted\": \"JohnSmith\",\n    \"familyName\": \"Smith\",\n    \"givenName\": \"John\"\n  },\n  \"emails\": [\n    {\n      \"value\": \"john_smith@example.com\",\n      \"primary\": true,\n      \"type\": \"work\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "yy2kMisiAA7XiM_2Y0ya6"
    }
  },
  "children": [
    {
      "id": "8l65Ddezk7mCru7d9Vl4n",
      "type": "paragraph",
      "children": [
        {
          "text": "Delete a SCIM user."
        }
      ]
    },
    {
      "id": "VxzhUV_RQtu-7WuWSsxkE",
      "type": "paragraph",
      "children": [
        {
          "text": "Current user must be of organization type."
        }
      ]
    }
  ]
}