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

# List groups

> Lists the organization's groups, newest first. `id` fetches exactly one; `user_id` fetches the group that user belongs to. When either filter is given, the (single) result also carries `month_spend` and `limit_remaining`; the plain listing reports the cap only.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/groups
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/groups:
    get:
      tags:
        - Users & Groups
      summary: List groups
      description: >-
        Lists the organization's groups, newest first. `id` fetches exactly one;
        `user_id` fetches the group that user belongs to. When either filter is
        given, the (single) result also carries `month_spend` and
        `limit_remaining`; the plain listing reports the cap only.
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: grp_84f20c19
          description: Fetch exactly this group.
        - name: user_id
          in: query
          required: false
          schema:
            type: string
            example: user_4821
          description: Fetch the group this user belongs to.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
            maximum: 200
      responses:
        '200':
          description: The groups
          content:
            application/json:
              schema:
                type: object
                properties:
                  groups:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          nullable: true
                          description: >-
                            Your id for the group (null for groups created
                            before stable ids existed — address those by name
                            via PATCH).
                        name:
                          type: string
                          nullable: true
                        monthly_limit:
                          type: number
                          nullable: true
                          description: Monthly spend cap in USD; null = no cap.
                        month_spend:
                          type: number
                          nullable: true
                          description: >-
                            Attributed spend this calendar month, in USD.
                            Present when `id` or `user_id` was given.
                        limit_remaining:
                          type: number
                          nullable: true
                          description: >-
                            monthly_limit minus month_spend (never below 0).
                            Present when `id` or `user_id` was given and a cap
                            is set.
                        created_at:
                          type: string
                          format: date-time
        '403':
          description: Not an API key
        '404':
          description: Unknown user (user_id filter)
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````