# Organization Hierarchy

An organization owns your deployments, members, roles, and billing. APIs and some Settings or audit labels call it a tenant. These names refer to the same resource. A `TENANT CREATED` audit event means that an organization was created.

For a first deployment, use the workspace already created for your organization. A workspace groups projects or teams. An environment groups deployments, such as development and production. The starter flow creates an environment named `sandbox` when you do not select an existing one. You do not need a larger hierarchy to run one Free deployment.

Default Tenant and Default Workspace select preferred resources for your account. A default that is not set does not mean that the corresponding resource is absent.

## Organization Plan and Deployment Tier

New organizations start on the Standard organization plan unless you pick Performance at sign up. The plan controls member, role, workspace, and environment allowances, the largest deployment tiers, and the highest managed tier a deployment can use. The Free deployment tier controls the resources and cost of that deployment. A Standard badge on the organization is therefore compatible with a Free deployment and no saved card. See [Account Plans](/organization/billing#account-plans) to change the plan.

Settings also shows account limits. Tenants Limit is the number of organizations that the user can own. Memberships Limit is the number of organizations that the user can belong to. Neither value is a node count or the number of Free deployments available. Read [Tiers & Storage](/deployments/tiers-storage#free) for Free eligibility.

## Hierarchy

```mermaid
graph TB
  Tenant[Tenant: Acme Corp]

  Tenant --> PlatformEng[Workspace: Platform Engineering]
  Tenant --> DataEng[Workspace: Data Engineering]

  PlatformEng --> Production[Env: Production]
  PlatformEng --> Staging[Env: Staging]

  DataEng --> Analytics[Env: Analytics]
```

| Level | Represents | Example |
| --- | --- | --- |
| Organization (tenant in the API) | Your organization | Acme Corp |
| Workspace | Business unit or team | Platform Engineering |
| Environment | Deployment stage | Production, Staging, Development |
| Deployment | A LaserData deployment (one or more nodes) | `prod-us-west-1` |

### Tenant

A tenant represents an organization. It owns billing, membership, roles, permissions, and isolated audit logs. A user can belong to multiple tenants.

### Workspace

A workspace groups environments for a business unit, team, or project. For example, separate Platform and Data Engineering into workspaces. Permissions can apply to one workspace without granting access to the others.

### Environment

An environment groups deployments within a workspace. Common uses include Development, Staging, and Production. Each environment contains one or more deployments, and permissions can apply to it individually. A deployment can [move](/api/deployments#move-a-deployment) to another environment of the same workspace without a restart of its runtimes, and access to it then follows the target environment's permissions.

### Deployment

A deployment runs [Apache Iggy](https://iggy.apache.org) on one or more nodes. [Warden](/deployments/warden) manages those nodes.

## Resource Protection

Protection adds a code requirement before a tenant, workspace, environment, or deployment can be deleted. Enable it with `protected: true` in an update request, or during deployment creation.

To delete a protected resource:

1. [Request a resource code](#request-resource-code).
2. Retrieve the time-based one-time code from the tenant's registered email address.
3. Supply it as the `code` query parameter in the delete request.

Any member with the relevant manage permission can enable protection. Only the tenant owner can change `protected: true` back to `false`.

Use protection for production resources. Deletion is irreversible. Deleting a deployment destroys its nodes, data, streams, topics, messages, configuration, and telemetry. Delete contained deployments before deleting a workspace, environment, or tenant. Deleting a workspace also removes its environments. Deleting a tenant removes its workspaces, environments, members, roles, and API keys.

## Member Management

Manage tenant membership through these actions:

* Invite users by email. They join when they accept the invitation.
* Assign or change [roles](/organization/roles-permissions).
* Remove members to revoke their access immediately. The [API keys](/security/api-keys) they created are deleted with them, and the audit trail lists each as `api_key_deleted`.

## Programmatic Access

Use [API keys](/security/api-keys) for CI/CD, automation, and integrations. Their roles and permissions follow the same RBAC model as interactive users. RBAC is role-based access control.

## Plan Limits

| Resource | Standard | Performance | Enterprise |
| --- | --- | --- | --- |
| Workspaces | 2 | 10 | Unlimited |
| Environments (total) | 3 | 100 | Unlimited |
| Environments a role can name per workspace | 2 | 3 | 5 |
| Members | 10 | 100 | 1000 |
| Invitations | 10 | 100 | 1000 |
| Custom roles | 2 | 20 | 100 |
| API keys | 3 | 10 | 100 |

The environment limit counts every environment of the organization, so you choose how to spread them across workspaces: Performance allows 10 workspaces and 100 environments in any split. Enterprise has unlimited workspaces and environments. A plan change applies the new limits at once.

## API Reference

### Get Tenant

Retrieve tenant details, including plan features, subscription, and limits:

```bash
curl https://api.laserdata.cloud/tenants/{tenant_id} \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "id": 1,
  "name": "Acme Corp",
  "protected": false,
  "created_at": "2025-01-10T08:00:00Z",
  "updated_at": "2025-06-15T12:30:00Z",
  "description": "Main production tenant",
  "email": "admin@acme.com",
  "features": {
    "invitations_limit": 100,
    "members_limit": 100,
    "roles_limit": 20,
    "workspaces_limit": 10,
    "environments_limit": 100,
    "deployment_tiers": [
      { "tier": "free", "limit": 1 },
      { "tier": "small", "limit": 3 },
      { "tier": "medium", "limit": 3 },
      { "tier": "large", "limit": 2 },
      { "tier": "xlarge", "limit": 1 },
      { "tier": "2xlarge", "limit": 1 }
    ],
    "deployment_access_rules_limit": 10,
    "deployment_configs_limit": 5,
    "deployment_backups_limit": 3,
    "deployment_snapshots_limit": 5,
    "private_connections_limit": 3,
    "private_endpoints_limit": 1,
    "byoc_enabled": true,
    "cluster_enabled": true,
    "on_premise_enabled": false,
    "private_networking_enabled": true,
    "multi_az_enabled": true,
    "dedicated_enabled": false,
    "backup_enabled": true,
    "cross_region_dr_enabled": false,
    "audit_retention_days": 30,
    "api_keys_limit": 10,
    "cloud_accounts_limit": 5,
    "notification_channels_limit": 5,
    "notification_subscriptions_limit": 10,
    "custom_domains_limit": 1,
    "backup_regions_limit": 3,
    "nodes_per_deployment_limit": 5,
    "backup_retention_days": 30,
    "snapshot_retention_days": 14,
    "pending_invitations_limit": 100,
    "api_key_allowed_ips_limit": 20,
    "workspaces_per_role_limit": 3,
    "environments_per_workspace_limit": 3,
    "concurrent_deployments_limit": 2,
    "audit_export_enabled": true,
    "advanced_connectors_enabled": true,
    "customer_managed_keys_enabled": false,
    "advanced_notification_channels_enabled": true
  },
  "subscription": {
    "id": 1,
    "plan": "performance",
    "active": true,
    "created_at": "2025-01-10T08:00:00Z",
    "valid_from": "2025-01-10T08:00:00Z",
    "valid_to": "2026-01-10T08:00:00Z"
  },
  "starter_available": true,
  "has_payment_method": true
}
```

`features` reports current limits and enabled capabilities. `deployment_tiers` lists the allowed tiers and their maximum deployment counts. `cloud_accounts_limit` limits [cloud accounts](/organization/cloud-accounts) across the tenant.

`notification_channels_limit` and `notification_subscriptions_limit` limit [notification](/observability/notifications) channels and subscriptions per channel. `starter_available` reports whether another Free tier deployment can be created. Enterprise features can be customized for a tenant.

### Update Tenant

```bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id} \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "description": "Updated description",
    "email": "admin@acme.com",
    "protected": true
  }'
```

Include only the fields that you want to change. Set `protected` to `true` to enable [resource protection](#resource-protection). Only the owner can set it back to `false`. A successful request returns `204 No Content`.

### Get Tenant Structure

Retrieve workspaces, environments, and deployments in one request. The request needs `info:read` on the organization and answers `403` without it:

```bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/structure \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "id": 1,
  "name": "Acme Corp",
  "workspaces": [
    {
      "id": 1,
      "name": "Platform Engineering",
      "environments": [
        {
          "id": 1,
          "name": "production",
          "deployments": [
            {
              "id": 1,
              "name": "prod-cluster",
              "cloud": "aws",
              "region": "us-west-1",
              "variant": "managed",
              "tier": "large",
              "supervisor_url": "https://supervisor-aws-us.laserdata.cloud"
            }
          ]
        }
      ]
    }
  ]
}
```

The response contains only what your role can see. An environment appears when your role has any permission in it, through a default or an environment grant. A workspace appears when your role can read it, or when it holds an environment that appears. Deployments appear only in environments where your role has `deployment:read`, so an environment can appear with an empty `deployments` list.

### Get Tenant Summary

```bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/summary \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "total_workspaces": 2,
  "total_environments": 5,
  "total_deployments": 8
}
```

The counts include only the workspaces, environments, and deployments that your role can see, with the same rules as the tenant structure.

### Create a Workspace

```bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/workspaces \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform Engineering",
    "description": "Core platform team",
    "email": "platform@acme.com"
  }'
```

### List Workspaces

```bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/workspaces \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "items": [
    {
      "id": 1,
      "name": "Platform Engineering",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    }
  ],
  "page": 1,
  "total_results": 1,
  "total_pages": 1
}
```

The list contains the workspaces your role can read and the workspace of every environment your role can see. A workspace your role reaches only through one of its environments is listed with just its `id` and `name`, and reading it by ID returns only its `id` and `name` inside a `workspace` object.

### Create an Environment

```bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}/environments \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production",
    "description": "Production environment"
  }'
```

### List Environments

```bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}/environments \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "items": [
    {
      "id": 1,
      "name": "production",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    }
  ],
  "page": 1,
  "total_results": 1,
  "total_pages": 1
}
```

The list contains the environments of the workspace that your role can see. `deployments_count` is `0` for an environment where your role does not have `deployment:read`.

### Update a Workspace

```bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id} \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform Engineering",
    "description": "Updated description",
    "email": "platform@acme.com",
    "protected": true
  }'
```

All fields are optional. Only the tenant owner can set `protected` back to `false`. A successful request returns `204 No Content`.

### Delete a Workspace

Delete every deployment in the workspace first. If the workspace is protected, [request a resource code](#request-resource-code) and supply it in the delete request:

```bash
curl -X DELETE "https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}?code={protection_code}" \
  -H "ld-api-key: YOUR_API_KEY"
```

An unprotected workspace does not need `code`. Deletion permanently removes the workspace, all its environments, and the [API keys](/security/api-keys) limited to it. It cannot be undone.

### Update an Environment

```bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}/environments/{environment_id} \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production",
    "description": "Updated description",
    "protected": true
  }'
```

All fields are optional. Only the tenant owner can set `protected` back to `false`. A successful request returns `204 No Content`. A name that another environment in the same workspace already uses returns `400 Bad Request` with code `environment_already_exists`.

### Delete an Environment

Delete every deployment in the environment first. If the environment is protected, [request a resource code](#request-resource-code) and supply it in the delete request:

```bash
curl -X DELETE "https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}/environments/{environment_id}?code={protection_code}" \
  -H "ld-api-key: YOUR_API_KEY"
```

An unprotected environment does not need `code`. Deletion is irreversible.

### Delete a Tenant

Only the owner can delete a tenant. First delete all deployments and settle all billing. If the tenant is protected, [request a resource code](#request-resource-code):

```bash
curl -X DELETE "https://api.laserdata.cloud/tenants/{tenant_id}?code={protection_code}" \
  -H "ld-api-key: YOUR_API_KEY"
```

An unprotected tenant does not need `code`. Deletion permanently destroys the tenant, workspaces, environments, members, roles, API keys, and other tenant data. It cannot be undone.

### Request Resource Code

Request a one-time code before deleting a protected resource. The platform sends it to the tenant's registered email address.

```bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/request_code \
  -H "ld-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": {
      "action_type": "delete_tenant",
      "payload": {
        "tenant_id": 1
      }
    }
  }'
```

A successful request returns `204 No Content`. The following action types select the resource:

| Action Type | Payload Fields |
| --- | --- |
| `delete_tenant` | `tenant_id` |
| `delete_workspace` | `tenant_id`, `workspace_id` |
| `delete_environment` | `tenant_id`, `workspace_id`, `environment_id` |
| `delete_deployment` | `tenant_id`, `workspace_id`, `environment_id`, `deployment_id` |

Requests are rate limited. Wait before requesting another code for the same resource.

### Get Tenant Summary

Use the deployment API, `{supervisor_url}`, for an aggregate summary of deployment resources across the tenant:

```bash
curl {supervisor_url}/tenants/{tenant_id}/summary \
  -H "ld-api-key: YOUR_API_KEY"
```

```json
{
  "healthy_deployments": 5,
  "unhealthy_deployments": 0,
  "healthy_nodes": 8,
  "unhealthy_nodes": 0,
  "total_connectors": 3,
  "total_streams": 12,
  "total_topics": 24,
  "total_partitions": 48,
  "total_segments": 192,
  "total_messages": 15000000,
  "total_consumer_groups": 6,
  "total_clients": 10
}
```

It requires `deployment:read` in every environment of the organization. Stream, topic, partition, segment, message, and consumer group counts are per deployment, so a cluster counts each stream once. `total_clients` adds up client connections over all nodes.

### Get Workspace Summary

Retrieve the same summary for one workspace:

```bash
curl {supervisor_url}/tenants/{tenant_id}/workspaces/{workspace_id}/summary \
  -H "ld-api-key: YOUR_API_KEY"
```

The response uses the tenant summary format. It requires `deployment:read` in every environment of the workspace.

<a id="whats-next" />

## Related pages

- [Roles & Permissions](/organization/roles-permissions)
- [API Keys](/security/api-keys)
- [Deployments](/deployments)

Source: https://docs.laserdata.com/organization
