---
title: "Rename Tenant"
method: PATCH
path: "/v1/auth/tenants/{tenant_id}"
tags: ["auth", "auth"]
---

# Rename Tenant

`PATCH /v1/auth/tenants/{tenant_id}`

## Request

- Base URL: `https://api.elaan.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elaan.io/v1/auth/tenants/{tenant_id}`
- Auth: none declared

Rename a tenant the signed-in user owns. Authorization is by membership
(not the token's active tenant), so a user can rename any tenant they own —
e.g. from the switcher — without switching into it first. Owner-only (every
membership is OWNER today; the check future-proofs for other roles).

## Path parameters

- `tenant_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- RenameTenantRequest: Rename an account the signed-in user owns. Blank/whitespace-only is a clean 422 (mirrors the Tenant domain rule).
  - `name` string, required

## Response `200`

Successful Response

- TenantResponse: One account the signed-in user belongs to (UI: 'account'; code: tenant).
  - `tenant_id` string, required
  - `name` string, required
  - `role` string, required
  - `is_default` boolean, required
  - `status` string: "active" or "archived". An archived account is hidden from the switcher and can no longer send — the trigger refuses it and fan-out skips it. Reversible via unarchive; data is retained.

## Other responses

- `403`: Not a member, or not the owner, of that tenant
- `404`: No such tenant
- `422`: Blank or over-long tenant name

---

[API](https://skmtc.dev/elaan/apis/elaan-api.md) · [All operations](https://skmtc.dev/elaan/apis/elaan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/elaan/apis/elaan-api/revisions/c96a7e6399aa?raw)
