> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Organizations

Manage your customer organizations
<div class="sdk-client-page">

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
<div class="sdk-method-section">

      Runs `create` and returns the result.

        Fields to update.

        The created resource.

```java
// displayName: Display name
// metadata: Custom key-value metadata
import 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);
```

</div>

### getById
<div class="sdk-method-section">

      Runs `getById` and returns the result.

        Resource ID.

        The response payload for this operation.

```java
scalekitClient.organizations().getById("org_123");
```

</div>

### getByExternalId
<div class="sdk-method-section">

      Runs `getByExternalId` and returns the result.

        External ID.

        The response payload for this operation.

```java
scalekitClient.organizations().getByExternalId("customer_123");
```

</div>

### updateById
<div class="sdk-method-section">

      Runs `updateById` and returns the result.

        Resource ID.

        Fields to update.

        The updated resource.

```java
// displayName: Display name
// metadata: Custom key-value metadata
import com.scalekit.grpc.scalekit.v1.organizations.UpdateOrganization;

UpdateOrganization req = UpdateOrganization.newBuilder()
  .setName("Acme Corp (Updated)")
  .build();

scalekitClient.organizations().updateById("org_123", req);
```

</div>

### updateByExternalId
<div class="sdk-method-section">

      Runs `updateByExternalId` and returns the result.

        External ID.

        Fields to update.

        The updated resource.

```java
// displayName: Display name
// metadata: Custom key-value metadata
import com.scalekit.grpc.scalekit.v1.organizations.UpdateOrganization;

UpdateOrganization req = UpdateOrganization.newBuilder()
  .setName("Acme Corp (Updated)")
  .build();

scalekitClient.organizations().updateByExternalId("customer_123", req);
```

</div>

### deleteById
<div class="sdk-method-section">

      Runs `deleteById` and returns the result.

        Resource ID.

        No return value

```java
scalekitClient.organizations().deleteById("org_123");
```

</div>

### deleteByExternalId
<div class="sdk-method-section">

      Runs `deleteByExternalId` and returns the result.

        External ID.

        No return value

```java
scalekitClient.organizations().deleteByExternalId("customer_123");
```

</div>

### listOrganizations
<div class="sdk-method-section">

      Runs `listOrganizations` and returns the result.

        Page size.

        Page token.

        Paginated organizations.

```java
scalekitClient.organizations().listOrganizations(20, "");
```

</div>

### generatePortalLink
<div class="sdk-method-section">

      Runs `generatePortalLink` and returns the result.

        Organization ID.

        Features.

        Authorization link.

```java
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)
);
```

</div>

### updateOrganizationSettings
<div class="sdk-method-section">

      Runs `updateOrganizationSettings` and returns the result.

        Organization ID.

        Settings.

        The updated resource.

```java
import java.util.Collections;
import com.scalekit.grpc.scalekit.v1.organizations.OrganizationSettingsFeature;

scalekitClient.organizations().updateOrganizationSettings(
  "org_123",
  Collections.emptyList()
);
```

</div>

### upsertUserManagementSettings
<div class="sdk-method-section">

      Runs `upsertUserManagementSettings` and returns the result.

        Organization ID.

        Settings.

        Organization user management settings.

```java
import com.scalekit.grpc.scalekit.v1.organizations.OrganizationUserManagementSettings;

OrganizationUserManagementSettings settings =
  OrganizationUserManagementSettings.newBuilder().build();

scalekitClient.organizations().upsertUserManagementSettings("org_123", settings);
```

</div>

### getOrganizationSessionPolicy
<div class="sdk-method-section">

      Runs `getOrganizationSessionPolicy` and returns the result.

        Organization ID.

        The response payload for this operation.

</div>

### updateOrganizationSessionPolicy
<div class="sdk-method-section">

      Runs `updateOrganizationSessionPolicy` and returns the result.

        Organization ID.

        Policy.

        The updated resource.

</div>

</div>


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
