Skip to content

Tenant Configuration

The Tenant Configuration endpoint provides tenant-specific configuration data required by client applications. This endpoint returns configuration for various modules such as authentication methods, OTP settings, and profile schema.

Endpoint

GET /tenant-configuration

Authentication: Tenant authentication required (user authentication not required)

Description

The tenant configuration endpoint returns tenant-specific settings that client applications need to function correctly. The response includes configuration for different modules, and the structure is designed to be extensible as new configuration modules are added.

Important: This endpoint requires tenant authentication but not user authentication. This allows client applications to fetch configuration before user authentication.

Request

Query Parameters

ParameterTypeRequiredDescription
schemaVersionstringNoProfile schema version to check for updates

Query Parameter Details:

  • schemaVersion: When provided, the endpoint compares it with the current profile schema version. If versions match, profileSchema field is not included in the response (no update needed). If versions differ or the parameter is not provided, the full profile schema is returned.

Response

Status Code: 200 OK

The response structure is an object where each key represents a configuration module. The available modules may vary based on tenant configuration.

Response Structure

The response is a dynamic object where each key represents a configuration module. The structure is extensible, and additional modules may be added in the future.

Current modules:

json
{
  "auth": {
    "methods": ["password", "facebook", "google", "apple", "otp"]
  },
  "otp": {
    "length": 6
  },
  "profileSchema": {
    "version": "1765145234171",
    "components": [...],
    "presentation": [...],
    "forms": {...}
  }
}

Note: The response structure may include additional modules in future versions. Client applications should handle unknown fields gracefully.

Response Fields

FieldTypeRequiredDescription
authobjectYesAuthentication module configuration
auth.methodsarrayYesList of enabled authentication methods
otpobjectYesOTP module configuration
otp.lengthnumberYesOTP code length (default: 6)
profileSchemaobjectNoProfile schema configuration (see below)

Configuration Modules

Auth Module

The auth configuration provides information about available authentication methods for the tenant.

FieldTypeDescription
methodsarrayArray of enabled authentication method names

Available Authentication Methods:

  • password - Email and password authentication
  • facebook - Facebook OAuth authentication
  • google - Google OAuth authentication
  • apple - Apple Sign In authentication
  • otp - OTP-based authentication
  • guest - Guest user authentication

Example:

json
{
  "auth": {
    "methods": ["password", "facebook", "google", "apple", "otp"]
  }
}

OTP Module

The otp configuration provides OTP-related settings for the tenant.

FieldTypeDescription
lengthnumberLength of OTP codes (default: 6)

Example:

json
{
  "otp": {
    "length": 6
  }
}

Profile Schema Module

The profileSchema configuration defines the structure, presentation, and forms for user profiles. This is a comprehensive configuration that includes component definitions, presentation layout, and form structures.

Important: For detailed information about the profile schema structure, see the Profile Schema Overview documentation.

Version Checking:

When the schemaVersion query parameter is provided and matches the current version, the profileSchema field is not included in the response. Otherwise, the full profile schema object is returned.

Example (when schema version matches):

json
{
  "auth": {
    "methods": ["password", "facebook"]
  },
  "otp": {
    "length": 6
  }
}

Example (when schema version differs or not provided):

json
{
  "auth": {
    "methods": ["password", "facebook"]
  },
  "otp": {
    "length": 6
  },
  "profileSchema": {
    "version": "1765145234171",
    "components": [...],
    "presentation": [...],
    "forms": {...}
  }
}

Usage Examples

Fetching Full Configuration

To fetch the complete tenant configuration:

bash
GET /tenant-configuration

Response: Returns all configuration modules with their full data.

Checking Profile Schema Updates

To check if the profile schema has been updated:

bash
GET /tenant-configuration?schemaVersion=1765145234171

Response: If the version matches, profileSchema field is not included. Otherwise, the full profile schema object is returned.

Notes

  • The response structure is dynamic and may include additional modules in the future
  • Profile schema version checking helps reduce unnecessary data transfer when the schema hasn't changed
  • All configuration values are tenant-specific and may vary between tenants
  • The endpoint is designed to be extensible: new configuration modules automatically appear in the response, and each module is independent