> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# upsertTenant

> Creates a new tenant or updates an existing one identified by `externalId` or `tenantId`.
Use this to keep Plain's tenant records in sync with the groups or organisations in your own product.
The `result` field on the output indicates whether a record was created or updated.
Requires the `tenant:read` and `tenant:create` permissions.

