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

# Add users to a group

> Adds users to a group and returns it with its members. Users already in it are left as they are. Admins only (users:update), as in the app. A role or department group is kept by the app and is refused (409). Members are teammates with a Statisfy login, as /v1/objects/user/records ids them; any other id is refused (422).



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/groups/{group_id}/members
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/groups/{group_id}/members:
    post:
      tags:
        - groups
      summary: Add users to a group
      description: >-
        Adds users to a group and returns it with its members. Users already in
        it are left as they are. Admins only (users:update), as in the app. A
        role or department group is kept by the app and is refused (409).
        Members are teammates with a Statisfy login, as /v1/objects/user/records
        ids them; any other id is refused (422).
      operationId: groups_add_members
      parameters:
        - description: The group's id, from GET /v1/groups
          in: path
          name: group_id
          required: true
          schema:
            maxLength: 64
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                user_ids:
                  description: >-
                    The users to add, as /v1/objects/user/records ids them. One
                    already in the group is left as it is.
                  items:
                    maxLength: 128
                    minLength: 1
                    type: string
                  maxItems: 1000
                  minItems: 1
                  title: User Ids
                  type: array
              required:
                - user_ids
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupWithMembers'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    GroupWithMembers:
      properties:
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the group was made
          title: Created At
        id:
          description: The group's id
          title: Id
          type: string
        member_count:
          description: The users in the group
          title: Member Count
          type: integer
        members:
          description: The users in the group, in the order they were added
          items:
            $ref: '#/components/schemas/GroupMember'
          title: Members
          type: array
        name:
          description: The group's name, as Settings > Team > Groups shows it
          title: Name
          type: string
        type:
          description: >-
            custom: a group someone made. role or department: the group the app
            keeps for every user with that role or department on their Team page
            record, named after it
          enum:
            - custom
            - role
            - department
          title: Type
          type: string
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the group's name last changed; adding or removing a member
            leaves it as it was
          title: Updated At
      required:
        - id
        - name
        - type
        - member_count
        - created_at
        - updated_at
        - members
      title: GroupWithMembers
      type: object
    GroupMember:
      properties:
        added_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the user was added to the group
          title: Added At
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: The user's email
          title: Email
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: The user's name
          title: Name
        user_id:
          description: The user, as /v1/objects/user/records ids it
          title: User Id
          type: string
      required:
        - user_id
        - name
        - email
        - added_at
      title: GroupMember
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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