> ## 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.

# Get a team

> Returns one team by `team_id`, or by `name` (with `scope`), with its version history,
workflow, roles, agents, readme and inputs, and what you may do with it (`can_edit`,
`can_delete`, `can_toggle_listing`). Send `version` for an older version.

Requires a token whose user can see the team given by `team_id` or `name`: a public listed team, or a team of an organization you belong to. Without sign-in: listed public teams only.



## OpenAPI

````yaml /openapi/hub-by-tag/hub-teams.yaml post /v1/teams/get_by_id
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_by_id:
    post:
      tags:
        - Teams
      summary: Get a team
      description: >-
        Returns one team by `team_id`, or by `name` (with `scope`), with its
        version history,

        workflow, roles, agents, readme and inputs, and what you may do with it
        (`can_edit`,

        `can_delete`, `can_toggle_listing`). Send `version` for an older
        version.


        Requires a token whose user can see the team given by `team_id` or
        `name`: a public listed team, or a team of an organization you belong
        to. Without sign-in: listed public teams only.
      operationId: POST_v1_teams_get_by_id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Team name — mutually exclusive with team_id
                scope:
                  type: string
                  description: >-
                    Scope (publisher) slug; required when name is provided and
                    scope is ambiguous
                team_id:
                  type: string
                  format: uuid
                  description: Team UUID — mutually exclusive with name
                version:
                  type: string
                  description: Pin to a specific published version; omit for latest
            examples:
              by_name:
                value:
                  scope: acme
                  name: code-review
              by_id:
                value:
                  team_id: 3f6c2a8e-6b1d-4c1e-9a57-0d2f4b8e91c4
                  version: 1.4.0
      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:
                    $ref: '#/components/schemas/TeamDetail'
              example:
                ok: true
                data:
                  id: 3f6c2a8e-6b1d-4c1e-9a57-0d2f4b8e91c4
                  name: code-review
                  scope: acme
                  description: Reviews a pull request and posts findings.
                  license: MIT
                  visibility: public
                  status: published
                  author: sshah
                  latest_version: 1.5.0
                  install_count: 128
                  tags:
                    - review
                  versions:
                    - version: 1.5.0
                      changelog: Adds a fix phase
                      published_at: 1759833600000
                      is_latest: true
                  workflow:
                    phases:
                      - name: review
                        agent: claude-code
                  roles:
                    - name: review
                      content_md: '# Reviewer'
                  agents: {}
                  readme: ''
                  cliq_version: null
                  tools:
                    - git
                  listed: true
                  raw_manifest: |-
                    name: code-review
                    version: 1.5.0
                    …
                  forked_from: null
                  fork_count: 0
                  draft: null
                  can_edit: true
                  can_delete: true
                  can_toggle_listing: true
        '401':
          description: >-
            `unauthorized`: No `Authorization` header, or the token is
            malformed, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    ok: false
                    error:
                      code: unauthorized
                      message: Authentication required
        '403':
          description: >-
            `forbidden`: You can see the record but your role in its realm is
            too low or lacks the required permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    ok: false
                    error:
                      code: forbidden
                      message: You do not have access to do this
        '404':
          description: >-
            `not_found`: The team does not exist or is in a realm you cannot see
            (404 rather than 403, so its existence is not revealed).


            `not_found`: No such team, you cannot see it, or the `version` does
            not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                not_found:
                  summary: not_found
                  value:
                    ok: false
                    error:
                      code: not_found
                      message: Not found
                not_found (endpoint):
                  summary: not_found (endpoint)
                  value:
                    ok: false
                    error: Team not found
                    code: not_found
        '422':
          description: '`invalid_params`: Neither `team_id` nor `name` was sent.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                invalid_params:
                  summary: invalid_params
                  value:
                    ok: false
                    error: Provide exactly one of team_id or name
                    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:
        - BearerAuth: []
components:
  schemas:
    TeamDetail:
      type: object
      description: One team with its latest (or requested) version.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: code-review
        scope:
          type: string
          nullable: true
          example: acme
        description:
          type: string
        license:
          type: string
          example: MIT
        visibility:
          type: string
          enum:
            - public
            - private
            - draft
        status:
          type: string
          enum:
            - draft
            - published
        author:
          type: string
          nullable: true
          description: Author's username.
        author_id:
          type: string
          nullable: true
        latest_version:
          type: string
          description: '`0.0.0` when nothing is published yet.'
          example: 1.5.0
        install_count:
          type: integer
        tags:
          type: array
          items:
            type: string
        created_at:
          type: string
          description: ISO timestamp.
        updated_at:
          type: string
          description: ISO timestamp.
        versions:
          type: array
          description: Version history, newest first.
          items:
            $ref: '#/components/schemas/TeamVersionEntry'
        workflow:
          type: object
          description: The version's phases (`phases`, and `support` phases when any).
          properties:
            phases:
              type: array
              items:
                type: object
                additionalProperties: true
            support:
              type: array
              items:
                type: object
                additionalProperties: true
        roles:
          type: array
          description: Role prompts per phase.
          items:
            type: object
            properties:
              name:
                type: string
              content_md:
                type: string
        agents:
          type: object
          additionalProperties: true
          description: Agents the version uses and their settings.
        readme:
          type: string
        cliq_version:
          type: string
          nullable: true
          description: Minimum cliq version the team needs.
        tools:
          type: array
          items:
            type: string
          description: Tools the team needs on the daemon.
        inputs:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Inputs the team takes.
        use_when:
          type: array
          items:
            type: string
        not_for:
          type: array
          items:
            type: string
        listed:
          type: boolean
          description: Shown in the public catalog.
        raw_manifest:
          type: string
          nullable: true
          description: The version's `team.yml`.
        forked_from:
          type: object
          nullable: true
          additionalProperties: true
          description: The team and version this one was forked from, when any.
        fork_count:
          type: integer
        draft:
          type: object
          nullable: true
          description: The unsaved working copy (only for people who can edit the team).
          properties:
            manifest:
              type: string
            description:
              type: string
              nullable: true
            saved_at:
              type: string
              nullable: true
        can_edit:
          type: boolean
          description: You may change this team.
        can_delete:
          type: boolean
          description: You may delete it.
        can_toggle_listing:
          type: boolean
          description: You may list or unlist it in the public catalog.
    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.
    TeamVersionEntry:
      type: object
      properties:
        version:
          type: string
          description: Semver version string
        changelog:
          type: string
          nullable: true
          description: Release notes for this version
        published_at:
          type: number
          nullable: true
          description: Publish timestamp (unix ms)
        is_latest:
          type: boolean
          description: True when this is the most recent published version
      required:
        - version
        - changelog
        - published_at
        - is_latest
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cliq_tok_* | cliq_dt_*
      description: >-
        User PAT (`cliq_tok_…`, including session-scoped) or realm token
        (`cliq_dt_…`).

````

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