---
deprecated: true
search:
  tags:
    - Multitenancy Recipe
    - PUT
seo:
  description: >-
    This API is deprecated. Please use the v2 version… Reference for the PUT
    /appid-{appId}/recipe/multitenancy/tenant endpoint in the Core Driver
    Interface API.
sidebar:
  badge: PUT
  label: Upsert tenant (deprecated)
title: Upsert tenant (deprecated)
type: openapi-operation
---
This API is deprecated. Please use the v2 version of this API. In the v2 version of the API, the login methods are no longer enabled using the `emailPasswordEnabled`, `thirdPartyEnabled` and `passwordlessEnabled` inputs. Instead, they are enabled using factorIds (such as emailpassword, otp-email, etc) specified in the `firstFactors` and `requiredSecondaryFactors` inputs. Please refer [Multitenancy Docs](https://supertokens.com/docs/multitenancy/new-tenant) to know the list of factorIds available.

Note: This deprecated API still accepts those `emailPasswordEnabled`, `thirdPartyEnabled` and `passwordlessEnabled` inputs for backward compatibility.

Creates or updates a tenant.

SuperTokens subscription license key is required.

If creating a new tenant, only the login methods set to true will be enabled and rest will be disabled by default.

`firstFactors` and `requiredSecondaryFactors` can be set to null to remove all entries in the core, or a non empty string array to be updated in the core. Setting of empty array is disallowed.

Note: the create/update will fail if a login method is not enabled and a relavant factor is added to either `firstFactors` or `requiredSecondaryFactors`. For example, `emailPasswordEnabled` cannot be set to `false` if `emailpassword` is present in the `firstFactors` array.

If updating an existing tenant,
1. core will keep the existing state of login methods and only update the ones that are specified in the request body.
2. Core config will be merged into existing config. To delete a key in the config, use a null value

The request must originate from public tenant, and the new tenant will use connectionUriDomain and app from which the request originates.

Note: Updation of core config is not allowed for the default connectionUriDomain, public app and tenant. In order to update config for the default connectionUriDomain, public app and tenant, you must edit the config.yaml or the docker env directly.

<Operation source="references-cdi" id="createorupdatetenantput" />
