> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcliq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List teams

> Lists teams in one of three modes:

- **Catalog** (no `realm_id` or `daemon_id`): published teams you can see, searchable by
  `query`, `tag` and `scope`; `mine: true` lists the teams you authored. Without a
  token, only public listed teams.
- **Realm roster** (`realm_id`): the realm's teams with where they are installed
  (`installed_count` of `online_daemon_count`, `coverage_label`) and any agents missing
  in the organization.
- **Daemon** (`daemon_id`): the teams installed on that daemon right now, read from it.

Pages of 50 by default (up to 200).

No authentication: anyone can call this.



## OpenAPI

````yaml /openapi/hub-by-tag/hub-teams.yaml post /v1/teams/get
openapi: 3.0.3
info:
  title: 'CliqHub API: Teams'
  version: 1.0.0
  description: >-
    The CliqHub team registry. A team is published under a scope
    (`@acme/code-review`) as

    numbered versions. Create a draft, change it (each change can mint the next
    version),

    publish it to make it installable, then install it on daemons. List teams
    with a

    `realm_id` to see a realm's roster and where each team is installed, or with
    a

    `daemon_id` to see what one daemon has. Build a team with AI drafts a team
    from a

    description.


    Changing a team (update, rename, publish, unpublish, delete) needs its
    author, or the

    publish permission in the organization that owns its scope.
servers:
  - url: https://{host}
    variables:
      host:
        default: cliqhub.io
        description: CliqHub host
security: []
tags:
  - name: Teams
    description: >-
      The CliqHub team registry. A team is published under a scope
      (`@acme/code-review`) as

      numbered versions. Create a draft, change it (each change can mint the
      next version),

      publish it to make it installable, then install it on daemons. List teams
      with a

      `realm_id` to see a realm's roster and where each team is installed, or
      with a

      `daemon_id` to see what one daemon has. Build a team with AI drafts a team
      from a

      description.


      Changing a team (update, rename, publish, unpublish, delete) needs its
      author, or the

      publish permission in the organization that owns its scope.
paths:
  /v1/teams/get:
    post:
      tags:
        - Teams
      summary: List teams
      description: >-
        Lists teams in one of three modes:


        - **Catalog** (no `realm_id` or `daemon_id`): published teams you can
        see, searchable by
          `query`, `tag` and `scope`; `mine: true` lists the teams you authored. Without a
          token, only public listed teams.
        - **Realm roster** (`realm_id`): the realm's teams with where they are
        installed
          (`installed_count` of `online_daemon_count`, `coverage_label`) and any agents missing
          in the organization.
        - **Daemon** (`daemon_id`): the teams installed on that daemon right
        now, read from it.


        Pages of 50 by default (up to 200).


        No authentication: anyone can call this.
      operationId: POST_v1_teams_get
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: >-
                    Search: `@scope/name` matches scope and name; other text
                    matches name, description or scope
                tag:
                  type: string
                  description: Filter by tag slug
                scope:
                  type: string
                  description: Filter to teams owned by this scope (publisher)
                mine:
                  type: boolean
                  description: When true, return only teams authored by the caller
                group_by_scope:
                  type: boolean
                  description: When true, group results by scope instead of a flat list
                listed:
                  type: boolean
                  description: Filter by listed flag (public marketplace visibility)
                status:
                  type: string
                  enum:
                    - draft
                    - published
                  description: Filter by team status
                org_id:
                  type: string
                  format: uuid
                  description: >-
                    Site-admin catalog listing: only teams published under a
                    scope of this org (ignored for everyone else)
                installed_realm_id:
                  type: string
                  minLength: 1
                  description: >-
                    Site-admin catalog listing: only teams installed on a daemon
                    of this realm (ignored for everyone else)
                realm_id:
                  type: string
                  minLength: 1
                  description: >-
                    Realm mode: return team roster with daemon coverage for this
                    realm
                daemon_id:
                  type: string
                  minLength: 1
                  description: 'Daemon mode: return live installed teams from this daemon'
                origin:
                  type: string
                  enum:
                    - published
                    - local
                  description: >-
                    Realm mode: filter by team origin (published catalog vs
                    local)
                coverage:
                  type: string
                  enum:
                    - full
                    - partial
                    - none
                  description: 'Realm mode: filter by coverage status across realm daemons'
                sort_by:
                  type: string
                  description: >-
                    Sort column. Realm mode: team | origin | coverage (default
                    team). Catalog / site-admin
                sort_dir:
                  type: string
                  enum:
                    - asc
                    - desc
                  description: >-
                    Sort direction with sort_by (default asc); ties are broken
                    by id ascending
                limit:
                  type: integer
                  minimum: 1
                  maximum: 200
                  description: Page size (default 50, max 200)
                offset:
                  type: integer
                  minimum: 0
                  description: Zero-based page offset (default 0)
                with_workflow:
                  type: boolean
                  description: 'Catalog mode: also return each team\'
            examples:
              search:
                summary: Search the catalog
                value:
                  query: review
                  limit: 20
                  with_workflow: true
              realm:
                summary: A realm's roster
                value:
                  realm_id: 5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b
                  coverage: partial
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                    description: Always `true` on success.
                  data:
                    type: object
                    required:
                      - items
                      - total
                      - offset
                      - limit
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/TeamData'
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
              examples:
                catalog:
                  summary: Catalog
                  value:
                    ok: true
                    data:
                      items:
                        - id: 3f6c2a8e-6b1d-4c1e-9a57-0d2f4b8e91c4
                          name: code-review
                          scope: acme
                          description: Reviews a pull request and posts findings.
                          author: sshah
                          latest_version: 1.5.0
                          install_count: 128
                          tags:
                            - review
                          listed: true
                          visibility: public
                          status: published
                      total: 1
                      offset: 0
                      limit: 20
                      type: array
                realm:
                  summary: Realm roster
                  value:
                    ok: true
                    data:
                      items:
                        - id: 3f6c2a8e-6b1d-4c1e-9a57-0d2f4b8e91c4
                          name: code-review
                          slug: code-review
                          label: '@acme/code-review'
                          scope: acme
                          version: 1.5.0
                          origin: published
                          in_team_list: true
                          installed_daemon_ids:
                            - 7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d
                          installed_count: 1
                          online_daemon_count: 2
                          coverage_label: 1/2 daemons
                          missing_agents: []
                          last_run_at: 1759834200000
                      total: 1
                      offset: 0
                      limit: 50
                      type: array
        '400':
          description: >-
            `invalid_params`: `sort_by` is a key of another mode (realm: `team`,
            `origin`, `coverage`; catalog: `name`, `install_count`,
            `created_at`, `updated_at`; none in daemon or `mine` mode).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                invalid_params:
                  summary: invalid_params
                  value:
                    ok: false
                    error: >-
                      sort_by 'coverage' does not apply in catalog mode
                      (allowed: name, install_count, created_at, updated_at)
                    code: invalid_params
        '401':
          description: '`unauthorized`: `realm_id` or `daemon_id` was sent without a token.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    ok: false
                    error: Authentication required
                    code: unauthorized
        '422':
          description: >-
            `invalid_params`: The body fails the request schema: a required
            field is missing or a value has the wrong type or format. The
            message lists every issue as `field: problem`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                invalid_params:
                  summary: invalid_params
                  value:
                    ok: false
                    error: 'query: Required'
                    code: invalid_params
        '500':
          description: >-
            `internal_error`: An unexpected server fault. Retry later; if it
            persists, report it with the time of the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                internal_error:
                  summary: internal_error
                  value:
                    ok: false
                    error: Internal server error
                    code: internal_error
      security: []
components:
  schemas:
    TeamData:
      type: object
      properties:
        id:
          type: string
          description: >-
            Catalog team UUID (realm mode: set for published teams; install with
            it)
        name:
          type: string
          description: Team name (natural key within scope)
        scope:
          type: string
          nullable: true
          description: Scope (publisher) slug; null for global teams
        version:
          type: string
          nullable: true
          description: Latest or requested version string; null when no versions exist
        description:
          type: string
          description: Human-readable summary
        status:
          type: string
          enum:
            - draft
            - published
          description: Current lifecycle status
        visibility:
          type: string
          description: Visibility level (public, private, draft)
        listed:
          type: boolean
          description: Whether this team appears in the public marketplace
        tags:
          type: array
          items:
            type: string
          description: Tag slugs attached to this team
        author:
          type: string
          nullable: true
          description: Username of the team author
        latest_version:
          type: string
          description: Latest published version string
        install_count:
          type: integer
          description: Total number of daemon installations
        version_count:
          type: integer
          description: >-
            Number of published versions (site-admin catalog listing; catalog
            with_workflow)
        phases:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Phase name
              type:
                type: string
                nullable: true
                description: Phase type (e.g. gate), or null for a standard phase
              agent:
                type: string
                nullable: true
                description: Agent that runs the phase, or null
            required:
              - name
              - type
              - agent
          description: Latest version\
        fork_count:
          type: integer
          description: How many teams were forked from this one (catalog with_workflow)
        verified:
          type: boolean
          description: Published by a verified (platform) scope (catalog with_workflow)
        author_id:
          type: string
          nullable: true
          description: UUID of the team author (site-admin catalog listing only)
        org_id:
          type: string
          nullable: true
          description: Org that owns the team\
        org_slug:
          type: string
          nullable: true
          description: Slug of that org (site-admin catalog listing only)
        created_at:
          type: number
          description: Team creation time (unix ms)
        updated_at:
          type: number
          description: Team last update time (unix ms)
        installed_daemon_ids:
          type: array
          items:
            type: string
          description: IDs of daemons in the realm that have this team installed
        installed_count:
          type: integer
          description: Number of realm daemons with this team installed
        online_daemon_count:
          type: integer
          description: Number of online daemons in the realm (coverage denominator)
        coverage_label:
          type: string
          description: Human-readable coverage summary (e.g. "2/3 daemons")
        missing_agents:
          type: array
          items:
            type: string
          description: >-
            Agent names referenced by this team that are not registered in the
            org
        origin:
          type: string
          enum:
            - published
            - local
          description: Whether the team came from the published catalog or a local install
        in_team_list:
          type: boolean
          description: Whether this team is in the realm team list
        last_run_at:
          type: number
          nullable: true
          description: Timestamp of the most recent run of this team in the realm (unix ms)
        slug:
          type: string
          description: Team slug (alias for name used in daemon/realm context)
        label:
          type: string
          description: Display label for the team (realm coverage context)
        sample_team_id:
          type: string
          nullable: true
          description: UUID of a representative team row (realm coverage context)
      required:
        - name
        - scope
    HubErr:
      type: object
      required:
        - ok
        - error
      description: >-
        Every failure. Route-policy denials (401/403/404, and 400 when neither
        realm_id nor org_id was sent) answer `error` as `{ code, message }`;
        errors raised by the endpoint answer `error` as the message with the
        code beside it in `code`. Every error has a code. See
        [Errors](/hub-api/errors).
      properties:
        ok:
          type: boolean
          description: Always false on error
        error:
          description: The message, or `{ code, message }` for an access denial.
          oneOf:
            - type: string
            - type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                message:
                  type: string
        code:
          type: string
          description: Stable error code of an endpoint error.
        details:
          type: object
          additionalProperties: true
          description: Structured detail, when there is some.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.