---
title: "List tenants"
method: GET
path: "/v1/workspaces/{workspaceId}/tenants"
tags: ["TenantService", "Tenants"]
---

# List tenants

`GET /v1/workspaces/{workspaceId}/tenants`

Lists the tenants asserted in a workspace, newest first. `query` matches against a tenant's name and its external_id, for type-ahead filters.

## Path parameters

- `workspaceId` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `query` string
- `labels` string
- `sortOrder` string
- `includeInfo` boolean

## Response `200`

OK

- ListTenantsResponse — List tenants response.
  - `items` Tenant[]
    - `metadata` ResourceMetadata, required — Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
      - `id` string, required — Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")
      - `accountId` string, required — Account this resource belongs to for multi-tenant isolation (prefixed ULID)
      - `workspaceId` string, required — Workspace this resource belongs to for organizational grouping (prefixed ULID)
      - `name` string, required — Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly
      - `externalId` string — External ID for the resource (e.g., a workflow ID from an external system)
      - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"environment": "production", "team": "platform", "version": "v2"}
      - `profileId` string, required — ID of the actor (user or service account) that created this resource
      - `createdAt` string, date-time, required — Timestamp when this resource was created
      - `updatedAt` string, date-time — Timestamp when this resource was last updated
    - `info` TenantInfo — TenantInfo provides read-only server-derived data about a tenant.
      - `subjectCount` integer — Number of subjects asserted under this tenant.
      - `objectiveCount` integer — Number of objectives associated with this tenant, across every surface — widget conversations and objectives created directly against the API alike. This is the footprint a delete would destroy, which is why it is worth the count query that populating `info` costs.
      - `widgetSessionCount` integer — Number of widget sessions minted for this tenant that still exist.
    - `state` 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ERASING', enum, required — The current lifecycle state of the tenant. Output only.
  - `pagination` Page — Page carries cursor-based pagination state. There is no total: the cursor walks the result set without ever counting it, and a count would cost a second query on every list.
    - `nextCursor` string

## Other responses

- `default` — Default error response

---

[API](https://skmtc.net/cadenya/apis/cadenya-api.md) · [All operations](https://skmtc.net/cadenya/apis/cadenya-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cadenya/cadenya-api/revisions/ac1a7f084068/schema)
