---
name: logs-router-tenant-delete
title: Deleting a tenant from IBM Cloud Logs Routing
description: You can delete a tenant in IBM Cloud Logs Routing through the UI, by using the API, or programmatically by using Terraform.
last-updated: 2025-07-03
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/logs-router?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Deleting a tenant from IBM Cloud Logs Routing
{: #tenant-delete}

You can delete a tenant in IBM Cloud Logs Routing through the UI, by using the API, or programmatically by using Terraform.
{: shortdesc}

A tenant is the account-specific configuration of IBM Cloud Logs Routing running within a region. You can define up to 1 target destination per tenant per region. The target defines where the logs are routed.


## Before you begin
{: #tenant-delete-prereqs}

Complete the following steps:

- Review [About IBM&reg; Cloud Logs Routing](https://cloud.ibm.com/docs/logs-router?topic=logs-router-about&format=markdown) to understand concepts.

- Install all prerequisite tools as described in the [getting started](https://cloud.ibm.com/docs/logs-router?topic=logs-router-getting-started&interface=ui&format=markdown#getting-started-before-you-begin).

- Set up permissions to manage targets in the account. For more information, see [Setting up IAM permissions for managing tenants](https://cloud.ibm.com/docs/logs-router?topic=logs-router-iam&interface=ui&format=markdown).


## Additional API requirements
{: #tenant-delete-prereqs-api}
{: api}

Complete the following steps:

- To get details on a tenant by using the API, check that you can connect to IBM Cloud Logs Routing by using the management API. For more information, see [Connecting to IBM&reg; Cloud Logs Routing](https://cloud.ibm.com/docs/logs-router?topic=logs-router-about&format=markdown#about_connecting).

- Deleting a tenant requires the tenant ID. If you do not remember your tenant ID, see [Retrieving tenant information in IBM Cloud Logs Routing](https://cloud.ibm.com/docs/logs-router?topic=logs-router-tenant-get&format=markdown).


## Retrieving the IAM bearer token
{: #tenant-delete-retrieve-iam-token}
{: api}


You must get an IBM Cloud&reg; Identity and Access Management (IAM) access token to authenticate your requests to the IBM&reg; Cloud Logs Routing service. For more information, see [Retrieving an access token](https://cloud.ibm.com/docs/logs-router?topic=logs-router-retrieve-access-token&format=markdown).

For example, you can retrieve your IAM bearer token and export it as an environment variable by running the following CLI command:

```sh
export IAM_TOKEN=`ibmcloud iam oauth-tokens --output json | jq -r '.iam_token'`
```
{: pre}


## Retrieving the tenant ID
{: #tenant-delete-retrieve-tenantID}
{: api}

To get the tenant ID, see [Retrieving tenant information](https://cloud.ibm.com/docs/logs-router?topic=logs-router-tenant-get&format=markdown).



## Choosing the management endpoint
{: #tenant-delete-endpoint}
{: api}

A tenant is the account-specific configuration of IBM Cloud Logs Routing running within a region.

To get the details of a tenant in a region, you must use the management endpoint URL for the region where the tenant is configured.
{: important}

You can use private or public endpoints.

For more information, see [Management endpoint URLs](https://cloud.ibm.com/docs/logs-router?topic=logs-router-endpoints&format=markdown).

## Deleting a tenant by using the API
{: #tenant-delete-api}
{: api}

The management endpoint that you call to remove a tenant is only available by using VPE.
{: important}

Run the following command to delete a tenant from the IBM Cloud Logs Routing service by using the **private endpoint**:

```sh
curl -X DELETE  https://management.private.${REGION}.logs-router.cloud.ibm.com/v1/tenants/${TENANT_ID} \
-H "IBM-API-Version: API_VERSION_DATE" \
-H "Authorization: ${IAM_TOKEN}"
```
{: pre}

Run the following command to delete a tenant from the IBM Cloud Logs Routing service by using the **public endpoint**:

```sh
curl -X DELETE  https://management.${REGION}.logs-router.cloud.ibm.com/v1/tenants/${TENANT_ID} \
-H "IBM-API-Version: API_VERSION_DATE" \
-H "Authorization: ${IAM_TOKEN}"
```
{: pre}

Where:

- `IAM_TOKEN` is the IAM token that you must use to authenticate the request.

- `TENANT_ID` defines the ID of the tenant that you are removing which was returned when the service was created.

- `REGION` defines the region where your tenant is located.

- `API_VERSION_DATE` defines the current date to request the latest version of the API. The valid format is `YYYY-MM-DD`. Any date up to the current date can be provided.





## Deleting a tenant and their targets through the UI
{: #tenant-delete-ui}
{: ui}

In the IBM Cloud Logs Routing console, you can see if a target is configured for a region.

When you delete a target, you also delete the account tenant definition in the region. Therefore, if you have a tenant with 2 targets, and you delete a target in the UI, you will delete the 2 targets and the tenant.
{: important}

To delete a target for a IBM Cloud Logs Routing tenant in a region, complete the following steps:

1. [Log in to your IBM Cloud account](https://cloud.ibm.com/login){: external}.

2. Click the **Menu** icon ![Menu icon](../icons/icon_hamburger.svg "Menu") &gt; **Observability**.

3. Click **Logging** > **Routing**.

4. Click the ![Actions icon](../icons/action-menu-icon.svg "Actions") next to the region that you want to change.

5. Click **Delete target**.

6. Confirm to delete the target.

## Deleting a tenant by using Terraform
{: #tenant-delete-tf}
{: terraform}

To delete a tenant that is managed by Terraform regardless of what targets may be configured, run the following Terraform command.

1. Run `terraform destroy` to delete a tenant and all its targets.