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

NameTypeDescription
idstringThe tenant, tnt_….

Body

JSON. The body is the mask: the keys you send are the fields that change. Neither field can be cleared.

FieldTypeRequiredDescription
namestringNoTrimmed, 1–80 characters.
logoURLNohttps 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

StatuserrorWhen
400invalid_requestEmpty body (“nothing to change”), an unknown key, an empty or too-long name, or a logo that is not an https URL.
401unauthorizedNo token, or an invalid, expired or ended one. See Authentication.
403forbiddenYou are a member of the tenant but not an owner.
404not_foundNo 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"}'