Organizations
Manage your customer organizations
Use scalekit_client.organization 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.
list_organizations
Section titled “list_organizations”#asynclist_organizations
Method to list organizations
Results per page.
Optional. page token for org list fetch
list of organizations
response = scalekit_client.organization.list_organizations( page_size=50, page_token='next_page_token')
for org in response[0].organizations: print(f"Organization: {org.display_name}")create_organization
Section titled “create_organization”#asynccreate_organization
Method to create organization based on given data
Create Organization obj with details for org creation
Create Organization Response
from scalekit.v1.organizations.organizations_pb2 import CreateOrganization
org = CreateOrganization()org.display_name = "Acme Corp"org.external_id = "acme_123"
response = scalekit_client.organization.create_organization(org)print(f"Created organization: {response[0].organization.id}")get_organization
Section titled “get_organization”#asyncget_organization
Method to get organization based on given org id
Organization id
Get Organization Response
response = scalekit_client.organization.get_organization('org_123456')organization = response[0].organizationprint(f"Organization: {organization.display_name}")get_organization_by_external_id
Section titled “get_organization_by_external_id”#asyncget_organization_by_external_id
Method to get organization based on given org id
External id to fetch org details
Get Organization Response
response = scalekit_client.organization.get_organization_by_external_id('acme_123')organization = response[0].organizationupdate_organization
Section titled “update_organization”#asyncupdate_organization
Method to update organization based on given data
Organization id to update
params for update organization operation
Update Organization Response
from scalekit.v1.organizations.organizations_pb2 import UpdateOrganization
org = UpdateOrganization()org.display_name = "Acme Corporation"
response = scalekit_client.organization.update_organization('org_123456', org)delete_organization
Section titled “delete_organization”#asyncdelete_organization
Method to delete organization based on given org id
Organization id
Empty on success.
scalekit_client.organization.delete_organization('org_123456')generate_portal_link
Section titled “generate_portal_link”#asyncgenerate_portal_link
Method to generate customer portal link
Organization id to fetch portal link for
Optional. Feature list to generate portal link for
Authorization link.
portal_link = scalekit_client.organization.generate_portal_link('org_123456')print(f"Portal Link: {portal_link}")update_organization_by_external_id
Section titled “update_organization_by_external_id”#asyncupdate_organization_by_external_id
Method to update organization based on external id
External id to update org
params for update organization operation
Update Organization Response
update_organization_settings
Section titled “update_organization_settings”#asyncupdate_organization_settings
Method to update organization settings
Organization id for org update
Organization settings
The updated resource.
upsert_user_management_settings
Section titled “upsert_user_management_settings”#asyncupsert_user_management_settings
Upsert organization user management settings like maximum allowed users.
Organization id for update
Optional. Maximum allowed users (None to clear)
None.
get_organization_session_policy
Section titled “get_organization_session_policy”#asyncget_organization_session_policy
Get the session policy for an organization.
Organization id
The response payload for this operation.
update_organization_session_policy
Section titled “update_organization_session_policy”#asyncupdate_organization_session_policy
Runs update_organization_session_policy and returns the result.
Organization ID.
Policy source.
Absolute session timeout.
Timeout unit.
Idle session timeout enabled.
Idle session timeout.
Timeout unit.
The updated resource.