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

# Move members into a group

> Move members of your team into a group, out of any group they were in.



## OpenAPI

````yaml openapi/magnific-api-v2-openapi.yaml POST /v2/team/groups/{group_id}/members
openapi: 3.1.0
info:
  title: Magnific API v2 — Team
  version: 2.0.0
  description: >-
    Read and manage your team with the Magnific API v2: members, groups, API
    keys, credit limits, the total budget (beta), tool permissions, credit usage
    and audit logs. Authenticate with a personal token or with an API key in
    `x-magnific-api-key`; each operation names the scope a personal token needs
    (`api:read`, `api:write` or `api:destructive`). Errors are JSON `{code,
    message, details?, request_id?}`. Listings page with `limit` and `cursor`,
    and answer `meta.pagination.next_cursor`.
servers:
  - description: Production V2
    url: https://api.magnific.com
security:
  - magnificApiKey: []
  - bearerAuth: []
tags:
  - description: Members and invitations of your team.
    name: Members
  - description: Groups of your team.
    name: Groups
  - description: API keys of your team.
    name: API keys
  - description: Credit limits and the total budget.
    name: Budgets
  - description: Tool permissions of the organization, groups and members.
    name: Permissions
  - description: Credit usage and project budgets.
    name: Analytics
  - description: Audit-log events and reports.
    name: Audit logs
paths:
  /v2/team/groups/{group_id}/members:
    post:
      tags:
        - Groups
      summary: Move members into a group
      description: >-
        Moves members of your team, by email, into the group, out of any group
        they were in. Answers the group.


        A personal token needs `api:write`.
      operationId: team_groups_members_add
      parameters:
        - description: A group of your team, as `GET /team/groups` lists it.
          example: 12
          in: path
          name: group_id
          required: true
          schema:
            format: int64
            minimum: 1
            type: integer
        - description: >-
            Personal token only: the team the call acts on (its UUID). The
            caller must be an active member of it. Without it, the team in the
            token is used; with neither, the call is `team_required` (400).
            Ignored for an API key, which always acts on its own team.
          example: 8a5b79ee-5d57-4ce0-b3e2-a00fbfed3ba5
          in: header
          name: x-magnific-team-id
          required: false
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Teamteam_groups_members_add_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Teamteam_groups_create_200_response'
          description: The group.
        '400':
          $ref: '#/components/responses/Team400-team-required'
        '401':
          $ref: '#/components/responses/Team401-unauthenticated'
        '403':
          $ref: '#/components/responses/Team403-forbidden'
        '404':
          $ref: '#/components/responses/Team404-not-found'
        '409':
          $ref: '#/components/responses/Team409-conflict'
        '422':
          $ref: '#/components/responses/Team422-validation-failed'
        '429':
          $ref: '#/components/responses/Team429-rate-limited'
        '500':
          $ref: '#/components/responses/Team500-server-error'
        '503':
          $ref: '#/components/responses/Team503-service-unavailable'
      security:
        - magnificApiKey: []
        - bearerAuth: []
components:
  schemas:
    Teamteam_groups_members_add_request:
      additionalProperties: false
      properties:
        member_emails:
          description: Emails, case-insensitive.
          example:
            - designer@example.com
          items:
            format: email
            maxLength: 254
            type: string
          maxItems: 100
          minItems: 1
          type: array
      required:
        - member_emails
      type: object
    Teamteam_groups_create_200_response:
      example:
        data:
          group_id: 12
          parent_group_id: 0
          name: Design
          member_count: 8
      properties:
        data:
          $ref: '#/components/schemas/Teamgroup'
      required:
        - data
      type: object
    Teamgroup:
      example:
        group_id: 12
        parent_group_id: 0
        name: Design
        member_count: 8
      properties:
        group_id:
          example: 12
          format: int64
          type: integer
        name:
          example: Design
          type: string
        parent_group_id:
          description: The parent group of a subgroup; `null` for a top-level group.
          format: int64
          type:
            - integer
            - 'null'
          example: null
        member_count:
          example: 8
          type: integer
      required:
        - group_id
        - member_count
        - name
        - parent_group_id
      type: object
    Teamerror:
      description: The body of every error of API v2.
      example:
        code: validation_failed
        details:
          required_scope: api:write
          errors:
            key:
              - errors
              - errors
        message: Validation error.
        request_id: 0f8c2c1e8d6a4b7f
      properties:
        code:
          description: >-
            Stable, for code: `team_required`, `unauthenticated`,
            `insufficient_scope`, `magnific_api_disabled`, `forbidden`,
            `not_found`, `conflict`, `validation_failed`, `upgrade_required`,
            `rate_limited`, `upstream_error`, `service_unavailable`,
            `server_error`... Each response lists the codes it carries.
          example: validation_failed
          type: string
        message:
          description: For people. The text can change.
          example: Validation error.
          type: string
        details:
          $ref: '#/components/schemas/Teamerror_details'
        request_id:
          description: >-
            The request's id, the same as the `X-Request-Id` response header.
            Share it with support.
          example: 0f8c2c1e8d6a4b7f
          type: string
      required:
        - code
        - message
      type: object
    Teamerror_details:
      additionalProperties: true
      description: >-
        What the refusal knows: `errors` lists the validation messages by field,
        `required_scope` names the scope an `insufficient_scope` error lacks,
        `minimum_credits` the lowest total budget allowed.
      example:
        required_scope: api:write
        errors:
          key:
            - errors
            - errors
      properties:
        errors:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
        required_scope:
          example: api:write
          type: string
      type: object
  responses:
    Team400-team-required:
      content:
        application/json:
          example:
            code: team_required
            message: 'No team: send x-magnific-team-id with the team id (a UUID).'
            request_id: 0f8c2c1e8d6a4b7f
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `team_required`: a personal token that names no team. Send
        `x-magnific-team-id`. Answered by the gateway.
    Team401-unauthenticated:
      content:
        application/json:
          example:
            code: unauthenticated
            message: Unauthenticated.
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: '`unauthenticated`: missing, invalid or expired credentials.'
    Team403-forbidden:
      content:
        application/json:
          examples:
            insufficient_scope:
              value:
                code: insufficient_scope
                message: Forbidden
                details:
                  required_scope: api:write
            magnific_api_disabled:
              value:
                code: magnific_api_disabled
                message: Magnific API is disabled for this organization.
            forbidden:
              value:
                code: forbidden
                message: You do not have permission to perform this action.
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `insufficient_scope`: the personal token or API key lacks the
        operation's scope (`details.required_scope`). `magnific_api_disabled`:
        the organization switched the Magnific API off. `forbidden`: the
        caller's role can't do this, on this resource, or the plan has no
        analytics.
    Team404-not-found:
      content:
        application/json:
          example:
            code: not_found
            message: Not Found
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `not_found`: no such member, group, API key or report in your team, or
        the route does not exist for your credential.
    Team409-conflict:
      content:
        application/json:
          example:
            code: conflict
            message: Conflict
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: '`conflict`: the change conflicts with the team''s current state.'
    Team422-validation-failed:
      content:
        application/json:
          example:
            code: validation_failed
            message: Validation error.
            details:
              errors:
                limit:
                  - This value should be an integer between 1 and 100.
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `validation_failed`: the body or the query is not valid. Field errors
        are listed by field in `details.errors`; a field or parameter the
        operation does not take is refused as not supported. A rule the domain
        checks comes with only `message`.
    Team429-rate-limited:
      content:
        application/json:
          example:
            code: rate_limited
            message: Too many requests
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `rate_limited`: too many requests. Wait the seconds in `Retry-After`.
        Answered by the gateway.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            example: 60
            type: integer
    Team500-server-error:
      content:
        application/json:
          example:
            code: server_error
            message: Internal Server error
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `server_error`: unexpected error. Retry; if it keeps failing, share the
        `request_id` with support.
    Team503-service-unavailable:
      content:
        application/json:
          example:
            code: service_unavailable
            message: Service Unavailable
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `service_unavailable`: the credential or the team could not be checked,
        or a search timed out. Retry later.
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Personal access token. Reads need the `api:read` scope; changes (team,
        budgets, audit-log exports) need `api:write`. Pick the team with
        `x-magnific-team-id`.

````

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