WHAT YOU'LL LEARN
  • How to create, install, and suspend tenants using the GraphQL API

This guide covers the core tenant management operations available through the GraphQL API.

Prerequisites
anchor

  • Access to your GraphQL API endpoint
  • Valid API token with Tenant Manager permissions

Mutations
anchor

All tenant operations are available under the tenantManager field in the root Mutation type:


Create Tenant
anchor

Creates a new tenant in the system.

Input
anchor

Fields:

  • id (optional) - Custom tenant ID. If not provided, one will be generated automatically
  • name (required) - Display name for the tenant
  • description (optional) - Tenant description

Request
anchor

Variables
anchor

Response
anchor


Install Tenant
anchor

Installs and provisions a tenant with default settings and configurations.

Input
anchor

  • tenantId (required) - ID of the tenant to install

Request
anchor

Variables
anchor

Response
anchor


Disable Tenant
anchor

Disables a tenant, preventing access to its resources.

Input
anchor

  • tenantId (required) - ID of the tenant to disable

Request
anchor

Variables
anchor

Response
anchor


Enable Tenant
anchor

Re-enables a previously disabled tenant.

Input
anchor

  • tenantId (required) - ID of the tenant to enable

Request
anchor

Variables
anchor

Response
anchor


Error Handling
anchor

All mutations return a BooleanResponse type with the following structure:

When an operation fails, check the error field for details:


Complete Example
anchor

Here’s a complete workflow for creating and setting up a new tenant: