Skip to main content

Delete an app from SuperTokens core

The following guide will show you how to delete an app from a SuperTokens Core instance. This operation is irreversible and will delete all user data associated with the app.

Before you start

Before you delete an app you need to make sure that the following requirements are met:

  • The request must originate from the public app and tenant
  • The app must not have any tenants other than the public tenant. You'll need to delete other tenants first.

Deleting an app using the API

danger

This operation cannot be undone. Make sure you have backed up any important data before proceeding.

To delete an app from the SuperTokens core, you can use the following cURL command:

curl --location --request POST '<CORE_API_ENDPOINT>/recipe/multitenancy/app/remove' \
--header 'api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"appId": "app1"
}'
  • The above command will delete the app with the appId of app1 and all its associated tenants.
  • All user data, configuration, and tenant information associated with this app will be permanently deleted.
  • The API key used must have the necessary permissions to delete apps.
important

After deleting an app, make sure to update any backend services that were configured to use this app ID to prevent unexpected errors.