---
title: Disable Tenant
slug: kron-pam-api-collection-3-9-0/disable-tenant
docTags: 
createdAt: 2026-10-21T06:10:28.166Z
---

{
  "id": "rjrSh0eV_hCbO8KxDwuRg",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/Multitenancy/disableTenant",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This request is used to disable a tenant in the system through the <code>disableTenant</code> API. The request body must include the <code>tenantId</code>, which uniquely identifies the tenant that needs to be disabled. The body is formatted as a JSON object, where the <code>tenantId</code> is provided as a key-value pair.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\"tenantId\":\"test77\"}",
          "value": "{\"tenantId\":\"test77\"}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "EM53ePzZvNZljau4BiGK9",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/Multitenancy/disableTenant \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\\"tenantId\\\":\\\"test77\\\"}\"'"
        },
        {
          "id": "Yg_fr51APh4P8sKGHVxzg",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\\"tenantId\\\":\\\"test77\\\"}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/Multitenancy/disableTenant\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "yWJFvRyYXtCNcRweQRVJM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/Multitenancy/disableTenant\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\\"tenantId\\\":\\\"test77\\\"}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "nVljY8zx5Xktddfh3PsZ_",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/Multitenancy/disableTenant\"\n\npayload = json.dumps(\"{\\\"tenantId\\\":\\\"test77\\\"}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "EM53ePzZvNZljau4BiGK9"
    },
    "results": {
      "languages": [
        {
          "id": "RuE2TYzwABk3N5n32Qq7A",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "RuE2TYzwABk3N5n32Qq7A"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}