# Tenant (your account)

> The tenant your key belongs to.

Canonical: https://docs.whabuzz.com/api/tenant/

The tenant your key belongs to.

Base URL `https://api.whabuzz.com`. Every request needs `Authorization: Bearer <key>` unless the operation says otherwise; see [Authentication](https://docs.whabuzz.com/authentication.md). Errors follow the [two-source contract](https://docs.whabuzz.com/errors.md).

Operations on this page:

- [`GET /v1/tenant`](#getTenant): Current tenant, including the Getting-started checklist
- [`PATCH /v1/tenant`](#updateTenant): Update retention or billing email

## Current tenant, including the Getting-started checklist {#getTenant}

`GET /v1/tenant`

Allowed for every tenant status, so a pending tenant can see why it is blocked.

**Auth:** API key (tenant key, or app key with `X-WhaBuzz-Tenant`). **Operation id:** `getTenant`.

cURL:

```bash
curl -X GET "https://api.whabuzz.com/v1/tenant" \
  -H "Authorization: Bearer $WHABUZZ_KEY"
```

**Responses**

**200** Tenant

```json
{
  "id": "a578246e-b97f-48e6-ae42-939ec3ccf917",
  "name": "Acme Fitness",
  "status": "active",
  "sandbox": false,
  "retention_days": 90,
  "billing_status": "trialing",
  "trial_ends_at": "2026-10-30T09:00:00Z",
  "created_at": "2026-10-16T09:00:00Z",
  "checklist": {
    "number_connected": true,
    "api_key_created": true,
    "webhook_verified": false,
    "test_message_sent": false
  }
}
```

**Common errors.** Shape and meanings are on the [Errors page](https://docs.whabuzz.com/errors.md).

| HTTP | WhaBuzz code | Meaning |
|---|---|---|
| 401 | `unauthorized` | Missing or invalid credentials |

## Update retention or billing email {#updateTenant}

`PATCH /v1/tenant`

**Auth:** API key (tenant key, or app key with `X-WhaBuzz-Tenant`). **Operation id:** `updateTenant`.

**Request body** (`application/json`, required)

| Field | Type | Required | Description |
|---|---|---|---|
| `retention_days` | `30` or `90` or `180` or `365` | no |  |
| `billing_email` | string (email) | no |  |
| `name` | string | no |  |

Request example:

```json
{
  "retention_days": 180
}
```

cURL:

```bash
curl -X PATCH "https://api.whabuzz.com/v1/tenant" \
  -H "Authorization: Bearer $WHABUZZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "retention_days": 180
}'
```

**Responses**

**200** Updated tenant

```json
{
  "id": "a578246e-b97f-48e6-ae42-939ec3ccf917",
  "name": "Acme Fitness",
  "status": "active",
  "retention_days": 180
}
```

**Common errors.** Shape and meanings are on the [Errors page](https://docs.whabuzz.com/errors.md).

| HTTP | WhaBuzz code | Meaning |
|---|---|---|
| 400 | `invalid_request` | Invalid request |
| 403 | `forbidden` | Not allowed for this caller |
