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

# List teams

> List all the teams that the current user is a member of. `user_id=me` must be passed in the query parameters.



## OpenAPI

````yaml /openapi/client.json get /teams
openapi: 3.1.0
info:
  title: Hexclave REST API
  version: 1.0.0
  description: >-
    The Hexclave REST API. All request headers are documented as canonical
    `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every
    endpoint for backwards compatibility. Response headers
    `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and
    `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*`
    equivalents.
servers:
  - url: https://api.hexclave.com/api/v1
    description: Hexclave REST API
security: []
paths:
  /teams:
    get:
      tags:
        - Teams
      summary: List teams
      description: >-
        List all the teams that the current user is a member of. `user_id=me`
        must be passed in the query parameters.
      parameters:
        - name: user_id
          in: query
          schema:
            type: string
            example: me
            description: >-
              Filter for the teams that the user is a member of. Can be either
              `me` or an ID. Must be `me` in the client API
          description: >-
            Filter for the teams that the user is a member of. Can be either
            `me` or an ID. Must be `me` in the client API
          required: false
        - name: order_by
          in: query
          schema:
            type: string
            enum:
              - created_at
            example: created_at
            description: >-
              Field to order results by. Currently only `created_at` is
              supported.
          description: Field to order results by. Currently only `created_at` is supported.
          required: false
        - name: desc
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            example: 'false'
            description: >-
              Whether to order results in descending order. Defaults to false
              (ascending).
          description: >-
            Whether to order results in descending order. Defaults to false
            (ascending).
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            description: The maximum number of items to return (capped at 200).
          description: The maximum number of items to return (capped at 200).
          required: false
        - name: cursor
          in: query
          schema:
            type: string
            description: >-
              The cursor to start the result set from. Requires `limit` to also
              be set.
          description: >-
            The cursor to start the result set from. Requires `limit` to also be
            set.
          required: false
        - name: query
          in: query
          schema:
            type: string
            description: >-
              A search query to filter the results by. Free-text search applied
              to the team's id (exact-match) and display name.
          description: >-
            A search query to filter the results by. Free-text search applied to
            the team's id (exact-match) and display name.
          required: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: ad962777-8244-496a-b6a2-e0c6a449c79e
                          description: The unique identifier of the team
                        display_name:
                          type: string
                          example: My Team
                          description: >-
                            Human-readable team display name. This is not a
                            unique identifier.
                        profile_image_url:
                          type: string
                          example: https://example.com/image.jpg
                          description: >-
                            URL of the profile image for team. Can be a Base64
                            encoded image. Must be smaller than 100KB. Please
                            compress and crop to a square before passing in.
                        client_metadata:
                          type: object
                          example:
                            key: value
                          description: >-
                            Client metadata. Used as a data store, accessible
                            from the client side. Do not store information that
                            should not be exposed to the client.
                        client_read_only_metadata:
                          type: object
                          example:
                            key: value
                          description: >-
                            Client read-only, server-writable metadata. Used as
                            a data store, accessible from the client side. Do
                            not store information that should not be exposed to
                            the client. The client can read this data, but
                            cannot modify it. This is useful for things like
                            subscription status.
                      required:
                        - id
                        - display_name
                  pagination:
                    type: object
                    properties:
                      next_cursor:
                        type: string
                        example: b3d396b8-c574-4c80-97b3-50031675ceb2
                        description: >-
                          The cursor to fetch the next page of results. null if
                          there is no next page.
                    required: []
                required:
                  - items

````