---
title: Enable Tenant
slug: single-connect-api-3-2-0/enable-tenant
description: Learn how to enable a tenant in a multi-tenancy system with this comprehensive code example. The document demonstrates the use of the curl command, along with custom headers and data, to make a seamless POST request. Follow this tutorial to effortlessly i
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "s_2YFKEHbQYLR6ZLMlHMb",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/Multitenancy/enableTenant",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\"tenantId\":\"test77\"}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "A tenant can be reactivated with enableTenant API.",
    "examples": {
      "languages": [
        {
          "id": "g8m7mJWXR0jUHLfyzF2hE",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/Multitenancy/enableTenant \\\n     --header 'accept: application/json'"
        },
        {
          "id": "4Y8zFaDsmnjyqO8mD1aMx",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/Multitenancy/enableTenant\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LkHGhi8a-gqFaWlzsnR1l",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/Multitenancy/enableTenant\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "xr91bfyTbFhIaCnbtHOwR",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/Multitenancy/enableTenant\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "g8m7mJWXR0jUHLfyzF2hE"
    },
    "results": {
      "languages": [
        {
          "id": "e4jtiWoXGOcEOZlN7n_1W",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "e4jtiWoXGOcEOZlN7n_1W"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}