Delete a Tenant API

On this page

This API is used to permanently delete a Tenant. Deleting a Tenant will delete all Users, Applications and Groups that belong to this tenant. Proceed with caution.

Request#

Delete a Tenant by Id. Deleting a Tenant also deletes all of its Users, Applications, and Groups.

API Key Authentication
Delete a Tenant by Id
DELETE/api/tenant/{tenantId}
OpenAPI Spec

Path Parameters#

tenantId
  • Type: UUID
  • Required

The unique Id of the Tenant to delete.

Query Parameters#

async
  • Type: Boolean
  • Optional
  • Defaults to false

Set this value to true to perform this request asynchronously, this means the API will return a response indicating the request has been accepted and will not wait for the operation to complete.

Request Headers#

X-FusionAuth-TenantId
  • Type: String
  • Optional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body#

eventInfo
  • Type: Object
  • Optional

Information about the request. FusionAuth adds the information to the events the request triggers, as event.info. For more information, see Pass Context From API Requests to Webhooks.

eventInfo.data
  • Type: Object
  • Optional

An object that holds any JSON you choose, such as a trace Id. FusionAuth copies the object to event.info.data without changes.

eventInfo.deviceDescription
  • Type: String
  • Optional

A description of the end user's device.

eventInfo.deviceName
  • Type: String
  • Optional

The name of the end user's device.

eventInfo.deviceType
  • Type: String
  • Optional

The type of the end user's device.

eventInfo.ipAddress
  • Type: String
  • Optional

The IP address of the end user. When your server calls FusionAuth for the end user, set this value to the end user's IP address. When this value is omitted, FusionAuth uses the IP address of the client that sent the request.

eventInfo.os
  • Type: String
  • Optional

The operating system of the end user's device.

eventInfo.userAgent
  • Type: String
  • Optional

The user agent of the end user's browser.

Response#

This API does not return a JSON response body.

Response Codes
CodeDescription
200The request succeeded.
202FusionAuth accepted the request, but the request isn't complete yet. The response is empty.
400The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present.
401FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses.
404The object you requested doesn't exist. The response is empty.
500FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty.