# Archive a tenant

Source: https://www.jawsdeploy.net/rest-api/tenants-archive | Section: Tenants

Archive a tenant so it no longer counts towards the plan limit.

`POST /api/tenant/archive`

Archives a tenant. An archived tenant keeps its name and tags, is hidden from the default listing, and frees its slot in the plan limit.

Archiving a tenant that is already archived does nothing. Use [Restore a tenant](https://www.jawsdeploy.net/rest-api/tenants-restore) to bring it back.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `tenantId` | body | string | yes | ID of the tenant. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `tenantId`. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks permission to manage tenants in this workspace. |

Example request:

```
POST /api/tenant/archive HTTP/1.1
Authorization: Basic <base64(serviceAccountId:apiKey)>
Content-Type: application/json

{ "tenantId": "tnt_acme" }
```

Example response:

```
{}
```

