Update a tenant
Rename a tenant you own, or change its logo.
PATCH /tenants/{id}
Renames a tenant or changes its logo. Who may join it (mode) is not
changeable here; that is the Management API’s.
Authorization
Authorization: Bearer <access token>: a user token minted by the org whose
host you call. A client_credentials token is refused with 401. The caller must be an owner of the tenant.
Path parameters
| Name | Type | Description |
|---|---|---|
id | string | The tenant, tnt_…. |
Body
JSON. The body is the mask: the keys you send are the fields that change. Neither field can be cleared.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Trimmed, 1–80 characters. |
logo | URL | No | https only. |
An empty body or any other key is a 400.
Response
200 with the tenant.
{
"id": "tnt_…",
"name": "Acme Paris",
"role": "owner",
"logo": "https://…"
}
Errors
| Status | error | When |
|---|---|---|
400 | invalid_request | Empty body (“nothing to change”), an unknown key, an empty or too-long name, or a logo that is not an https URL. |
401 | unauthorized | No token, or an invalid, expired or ended one. See Authentication. |
403 | forbidden | You are a member of the tenant but not an owner. |
404 | not_found | No such tenant, a tenant you are not a member of, or an id that is not tnt_…. |
Example
curl -X PATCH https://acme.loginwith.dev/tenants/tnt_… \
-H "Authorization: Bearer eyJ…" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Paris"}'