---
title: "Relocate a group within the hierarchy."
url: "https://developers.vzconnect.com/apis/group-relocation-api-v1/versions/9d82e980-10c9-4b48-b3e4-7a5488667ada/operations/relocateGroup"
---

> Full API specification: https://developers.vzconnect.com/apis/group-relocation-api-v1/versions/9d82e980-10c9-4b48-b3e4-7a5488667ada.md

# Relocate a group within the hierarchy.

`POST` `/cmd/v1/groups/specialops/groups`

Operation ID: `relocateGroup`

Moves a group to a different parent group within the REVEAL account's organizational hierarchy. The request body must include the group ID and the target parent group.

## Request body (required)

Content types: `application/json`

## Responses

- `204` - Group relocated within the hierarchy. No response body.
- `400` - Bad request. The parent group was not found, the parent is the Ungrouped group, the group to move is the Ungrouped group or the root group, or the relocation would create a circular reference.
- `401` - Invalid token or an Authorization problem.
- `404` - The group to move (ChildGroupId) was not found.
- `500` - Internal server error.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Group Relocation API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /cmd/v1/groups/specialops/groups:
    post:
      summary: Relocate a group within the hierarchy.
      description: Moves a group to a different parent group within the REVEAL
        account's organizational hierarchy. The request body must include the
        group ID and the target parent group.
      operationId: relocateGroup
      tags:
        - Group Relocation API
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/cmd/v1/groups/specialops/groups/?$
      requestBody:
        description: The group to move and the group that becomes its new parent. Both
          values are client group IDs.
        content:
          application/json:
            schema:
              type: object
              required:
                - ParentGroupId
                - ChildGroupId
              properties:
                ParentGroupId:
                  type: string
                  description: Client group ID of the new parent group.
                ChildGroupId:
                  type: string
                  description: Client group ID of the group to move. Its child groups move with
                    it.
        required: true
      responses:
        "204":
          description: Group relocated within the hierarchy. No response body.
        "400":
          description: Bad request. The parent group was not found, the parent is the
            Ungrouped group, the group to move is the Ungrouped group or the
            root group, or the relocation would create a circular reference.
          content:
            application/json: {}
        "401":
          description: Invalid token or an Authorization problem.
        "404":
          description: The group to move (ChildGroupId) was not found.
        "500":
          description: Internal server error.
          content:
            application/json: {}
```
