Skip to content
Scalekit Docs
Talk to an EngineerDashboard

Organizations

Manage your customer organizations

Use the organization client 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.

clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asynccreateOrganization

Creates a new organization (tenant) in your Scalekit application.

paramnamestring

Display name for the organization (e.g., “Acme Corporation”)

paramoptionsobject

Optional fields: externalId, logoUrl, slug.

externalId, logoUrl, slug
returnsCreateOrganizationResponse

The created organization.

// externalId: Your system's ID for this org
// logoUrl: Public URL of the org logo
// slug: URL-safe org slug
const org = await scalekit.organization.createOrganization(
'Acme Corporation',
{ externalId: 'customer_12345' }
);
console.log('Organization ID:', org.organization.id);
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asynclistOrganization

Retrieves a paginated list of all organizations in your Scalekit environment.

paramoptionsobject

Optional fields: pageSize, pageToken.

pageSize, pageToken
returnsListOrganizationsResponse

Paginated organizations.

// pageSize: Results per page (default 10, max 100)
// pageToken: Token for the next page
const response = await scalekit.organization.listOrganization({
pageSize: 20
});
console.log('Organizations:', response.organizations);
console.log('Total:', response.totalSize);
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncgetOrganization

Retrieves detailed information about a specific organization using its Scalekit ID.

paramidstring

Scalekit resource ID.

returnsGetOrganizationResponse

The organization.

const response = await scalekit.organization.getOrganization('org_12345');
const org = response.organization;
console.log('Organization:', org.displayName);
console.log('External ID:', org.externalId);
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncgetOrganizationByExternalId

Retrieves detailed information about an organization using your system’s external identifier.

paramexternalIdstring

Your system’s unique identifier for the organization

returnsGetOrganizationResponse

The organization.

const response = await scalekit.organization.getOrganizationByExternalId('customer_12345');
const org = response.organization;
console.log('Scalekit ID:', org.id);
console.log('Organization:', org.displayName);
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncupdateOrganization

Updates an organization’s properties using its Scalekit ID.

paramidstring

The Scalekit organization identifier (format: “org_…”)

paramorganizationobject

Fields to update.

Partial(UpdateOrganization)
returnsUpdateOrganizationResponse

The updated organization.

// displayName: Display name
// metadata: Custom key-value metadata
const response = await scalekit.organization.updateOrganization('org_12345', {
displayName: 'Acme Corporation (Updated)',
metadata: {
industry: 'Technology',
size: 'Enterprise'
}
});
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncupdateOrganizationByExternalId

Updates an organization’s properties using your system’s external identifier.

paramexternalIdstring

Your system’s unique identifier for the organization

paramorganizationobject

Fields to update.

Partial(UpdateOrganization)
returnsUpdateOrganizationResponse

The updated organization.

// displayName: Display name
const response = await scalekit.organization.updateOrganizationByExternalId(
'customer_12345',
{ displayName: 'New Company Name' }
);
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncdeleteOrganization

Permanently deletes an organization from your Scalekit environment.

paramorganizationIdstring

The Scalekit organization identifier to delete

returnsobject

Empty response on successful deletion

MessageShape(typeof EmptySchema)
await scalekit.organization.deleteOrganization('org_12345');
console.log('Organization deleted successfully');
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncupdateOrganizationSettings

Updates configuration settings and feature flags for an organization.

paramorganizationIdstring

Organization ID.

paramsettingsOrganizationSettings

Configuration settings object containing:

returnsGetOrganizationResponse

The organization.

const response = await scalekit.organization.updateOrganizationSettings('org_12345', {
features: [
{ name: 'sso', enabled: true },
{ name: 'directory_sync', enabled: true }
]
});
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncupsertUserManagementSettings

Creates or updates user management settings for an organization.

paramorganizationIdstring

Organization ID.

paramsettingsOrganizationUserManagementSettingsInput

User management configuration:

returnsOrganizationUserManagementSettingsMessage | undefined

Organization user management settings message | undefined.

OrganizationUserManagementSettingsMessage | undefined
const settings = await scalekit.organization.upsertUserManagementSettings(
'org_12345',
{ maxAllowedUsers: 100 }
);
console.log('Max users allowed:', settings?.maxAllowedUsers);
clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncsearchOrganization

Searches for organizations matching a query string.

paramquerystring

Search query string

parampageSizenumber

Optional. Number of results per page

parampageTokenstring

Optional. Pagination token for the next page

returnsSearchOrganizationsResponse

Paginated results.

clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncgetOrganizationUserManagementSetting

Retrieves the user management settings for a specific organization.

paramorganizationIdstring

The Scalekit organization identifier

returnsGetOrganizationUserManagementSettingsResponse

The response payload for this operation.

clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncupdateOrganizationSessionPolicy

Sets a custom session policy for an organization or reverts it to application defaults.

paramorganizationIdstring

Organization ID.

parampolicyOrganizationSessionPolicyInput

The policy to apply.

returnsOrganizationSessionPolicySettings

The updated session policy.

clientOrganizationshttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts
#asyncgetOrganizationSessionPolicy

Retrieves the session policy for a specific organization.

paramorganizationIdstring

The Scalekit organization identifier

returnsOrganizationSessionPolicySettings

The organization’s session policy settings