Organizations
Manage your customer organizations
Use scalekitClient.organizations() to create and manage customer tenants (organizations) in your Scalekit application.
Start here when onboarding a new customer: create an organization, set external IDs and branding, then add users and SSO for that org.
create
Section titled “create”#asynccreate
Runs create and returns the result.
Fields to update.
The created resource.
// displayName: Display name// metadata: Custom key-value metadataimport com.scalekit.grpc.scalekit.v1.organizations.CreateOrganization;import com.scalekit.grpc.scalekit.v1.organizations.Organization;
CreateOrganization req = CreateOrganization.newBuilder() .setName("Acme Corporation") .build();
Organization org = scalekitClient.organizations().create(req);getById
Section titled “getById”#asyncgetById
Runs getById and returns the result.
Resource ID.
The response payload for this operation.
scalekitClient.organizations().getById("org_123");getByExternalId
Section titled “getByExternalId”#asyncgetByExternalId
Runs getByExternalId and returns the result.
External ID.
The response payload for this operation.
scalekitClient.organizations().getByExternalId("customer_123");updateById
Section titled “updateById”#asyncupdateById
Runs updateById and returns the result.
Resource ID.
Fields to update.
The updated resource.
// displayName: Display name// metadata: Custom key-value metadataimport com.scalekit.grpc.scalekit.v1.organizations.UpdateOrganization;
UpdateOrganization req = UpdateOrganization.newBuilder() .setName("Acme Corp (Updated)") .build();
scalekitClient.organizations().updateById("org_123", req);updateByExternalId
Section titled “updateByExternalId”#asyncupdateByExternalId
Runs updateByExternalId and returns the result.
External ID.
Fields to update.
The updated resource.
// displayName: Display name// metadata: Custom key-value metadataimport com.scalekit.grpc.scalekit.v1.organizations.UpdateOrganization;
UpdateOrganization req = UpdateOrganization.newBuilder() .setName("Acme Corp (Updated)") .build();
scalekitClient.organizations().updateByExternalId("customer_123", req);deleteById
Section titled “deleteById”#asyncdeleteById
Runs deleteById and returns the result.
Resource ID.
No return value
scalekitClient.organizations().deleteById("org_123");deleteByExternalId
Section titled “deleteByExternalId”#asyncdeleteByExternalId
Runs deleteByExternalId and returns the result.
External ID.
No return value
scalekitClient.organizations().deleteByExternalId("customer_123");listOrganizations
Section titled “listOrganizations”#asynclistOrganizations
Runs listOrganizations and returns the result.
Page size.
Page token.
Paginated organizations.
scalekitClient.organizations().listOrganizations(20, "");generatePortalLink
Section titled “generatePortalLink”#asyncgeneratePortalLink
Runs generatePortalLink and returns the result.
Organization ID.
Features.
Authorization link.
import java.util.Arrays;import com.scalekit.grpc.scalekit.v1.organizations.Feature;
scalekitClient.organizations().generatePortalLink( "org_123", Arrays.asList(Feature.FEATURE_USERS, Feature.FEATURE_CONNECTIONS));updateOrganizationSettings
Section titled “updateOrganizationSettings”#asyncupdateOrganizationSettings
Runs updateOrganizationSettings and returns the result.
Organization ID.
Settings.
The updated resource.
import java.util.Collections;import com.scalekit.grpc.scalekit.v1.organizations.OrganizationSettingsFeature;
scalekitClient.organizations().updateOrganizationSettings( "org_123", Collections.emptyList());upsertUserManagementSettings
Section titled “upsertUserManagementSettings”#asyncupsertUserManagementSettings
Runs upsertUserManagementSettings and returns the result.
Organization ID.
Settings.
Organization user management settings.
import com.scalekit.grpc.scalekit.v1.organizations.OrganizationUserManagementSettings;
OrganizationUserManagementSettings settings = OrganizationUserManagementSettings.newBuilder().build();
scalekitClient.organizations().upsertUserManagementSettings("org_123", settings);getOrganizationSessionPolicy
Section titled “getOrganizationSessionPolicy”#asyncgetOrganizationSessionPolicy
Runs getOrganizationSessionPolicy and returns the result.
Organization ID.
The response payload for this operation.
updateOrganizationSessionPolicy
Section titled “updateOrganizationSessionPolicy”#asyncupdateOrganizationSessionPolicy
Runs updateOrganizationSessionPolicy and returns the result.
Organization ID.
Policy.
The updated resource.