---
title: "Update a group"
url: "https://developers.vzconnect.com/apis/groups-hierarchy-api/versions/6301049c-0ba5-4584-a236-ea7417e150ff/operations/updateGroup"
---

> Full API specification: https://developers.vzconnect.com/apis/groups-hierarchy-api/versions/6301049c-0ba5-4584-a236-ea7417e150ff.md

# Update a group

`PATCH` `/v1/groups/{group-id}`

Operation ID: `updateGroup`

Applies partial changes to a group. The `groupId` never changes. Send an RFC 6902 JSON Patch document: an array of operations applied in order. The request is all or nothing, so if one operation fails, none are applied. Supported operations: - `replace` on `/name` renames the group. - `add` on `/externalIds/-` sets the external ID, whether or not the group already has one. - `replace` or `remove` on `/externalIds/0` changes or clears an existing external ID, otherwise `422`. System groups are protected: `Entire Fleet` cannot be renamed, and `[Ungrouped]` is read-only. An unsupported `op` or `path` returns `400`, and an external ID already used by another group returns `422`. Errors point to the failing operation by index, so `/1/op` is the `op` of the second operation. Send the `ETag` from an earlier response in `If-Match` to apply the changes only if the group has not changed since; otherwise the request fails with `412` and nothing is updated. Each successful update returns a new `ETag`. Retrying with the same `Idempotency-Key` and body returns the original outcome without repeating the update.

## Path parameters

- `group-id` (string, required) - Unique group identifier. Accepts either a server-owned groupId or a customer-owned externalId in scope:value format.

## Header parameters

- `If-Match` (string, required) - The `ETag` value from an earlier response for this group. The update is applied only if the group has not changed since then. Otherwise the request fails with 412. Send one value only.
- `Idempotency-Key` (string, required) - Unique client-generated key used to prevent duplicate processing of a request during network retries. Value must be enclosed in double quotes (e.g., "7b9b5f3a-2a1e-4c8d").
- `traceparent` (string, optional) - Standard W3C Trace Context header used to propagate distributed tracing identifiers across microservices.
- `tracestate` (string, optional) - Standard W3C Trace Context header containing vendor-specific routing and tracing key-value pairs.

## Request body (required)

Content types: `application/json`

## Responses

- `204` - No Content
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found
- `412` - Precondition Failed
- `415` - Unsupported Media Type
- `422` - Unprocessable Content
- `429` - Too Many Requests
- `default` - Internal Server Error

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Groups Management API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /v1/groups/{group-id}:
    parameters:
      - $ref: "#/components/parameters/GroupIdPath"
    patch:
      tags:
        - Groups Management API
      operationId: updateGroup
      summary: Update a group
      description: >-
        Applies partial changes to a group. The `groupId` never changes.


        Send an RFC 6902 JSON Patch document: an array of operations applied in
        order. The request is all or nothing, so if one operation fails, none
        are applied.


        Supported operations:

        - `replace` on `/name` renames the group.

        - `add` on `/externalIds/-` sets the external ID, whether or not the
        group already has one.

        - `replace` or `remove` on `/externalIds/0` changes or clears an
        existing external ID, otherwise `422`.


        System groups are protected: `Entire Fleet` cannot be renamed, and
        `[Ungrouped]` is read-only.


        An unsupported `op` or `path` returns `400`, and an external ID already
        used by another group returns `422`. Errors point to the failing
        operation by index, so `/1/op` is the `op` of the second operation.


        Send the `ETag` from an earlier response in `If-Match` to apply the
        changes only if the group has not changed since; otherwise the request
        fails with `412` and nothing is updated. Each successful update returns
        a new `ETag`.


        Retrying with the same `Idempotency-Key` and body returns the original
        outcome without repeating the update.
      parameters:
        - $ref: "#/components/parameters/IfMatch"
        - $ref: "#/components/parameters/IdempotencyKey"
        - $ref: "#/components/parameters/TraceParent"
        - $ref: "#/components/parameters/TraceState"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GroupPatchRequest"
            examples:
              Rename a group (single operation):
                value:
                  - op: replace
                    path: /name
                    value: North West Region Fleet
              Add the external identifier (single operation):
                value:
                  - op: add
                    path: /externalIds/-
                    value: fleet:north-west-region-01
              Clear the external identifier (single operation):
                value:
                  - op: remove
                    path: /externalIds/0
              Rename a group and change its external identifier (multiple operations):
                value:
                  - op: replace
                    path: /name
                    value: North West Region Fleet
                  - op: replace
                    path: /externalIds/0
                    value: fleet:north-west-region-02
      responses:
        "204":
          description: No Content
          headers:
            ETag:
              $ref: "#/components/headers/ETag"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "412":
          $ref: "#/components/responses/PreconditionFailed"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "422":
          $ref: "#/components/responses/UnprocessableContent"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        default:
          $ref: "#/components/responses/InternalServerError"
components:
  parameters:
    GroupIdPath:
      name: group-id
      in: path
      description: Unique group identifier. Accepts either a server-owned groupId or a
        customer-owned externalId in scope:value format.
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 45
        pattern: ^([0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?=.{3,45}$)[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+)$
      examples:
        By groupId:
          value: 019726a4-3b2c-7def-8abc-1234567890ab
        By externalId:
          value: fleet:north-west-region-01
    IfMatch:
      name: If-Match
      in: header
      description: The `ETag` value from an earlier response for this group. The
        update is applied only if the group has not changed since then.
        Otherwise the request fails with 412. Send one value only.
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 120
        pattern: ^"[a-z0-9-]+"$
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: Unique client-generated key used to prevent duplicate processing of
        a request during network retries. Value must be enclosed in double
        quotes (e.g., "7b9b5f3a-2a1e-4c8d").
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 120
        pattern: ^"[a-z0-9-]+"$
    TraceParent:
      name: traceparent
      in: header
      description: Standard W3C Trace Context header used to propagate distributed
        tracing identifiers across microservices.
      required: false
      schema:
        type: string
        minLength: 55
        maxLength: 55
        pattern: ^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$
    TraceState:
      name: tracestate
      in: header
      description: Standard W3C Trace Context header containing vendor-specific
        routing and tracing key-value pairs.
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 512
        pattern: ^[^\n]{1,512}$
  schemas:
    GroupPatchRequest:
      title: A JSON Patch document as defined by RFC 6902
      description: An ordered list of operations to apply to the group. Operations are
        applied in the order listed. If any operation fails, none are applied.
      type: array
      minItems: 1
      maxItems: 2
      items:
        $ref: "#/components/schemas/GroupPatchOperation"
    GroupPatchOperation:
      title: A JSON Patch operation as defined by RFC 6902
      description: A single operation within a JSON Patch document.
      type: object
      additionalProperties: false
      required:
        - op
        - path
      properties:
        op:
          type: string
          description: The operation to perform. The group resource supports `add`,
            `replace` and `remove`.
          minLength: 3
          maxLength: 7
          pattern: ^(add|replace|remove)$
        path:
          type: string
          description: An RFC 6901 JSON Pointer to the location being changed. The group
            resource supports `/name`, `/externalIds/-` and `/externalIds/0`.
          minLength: 5
          maxLength: 14
          pattern: ^/(name|externalIds/(-|0))$
        value:
          type: string
          description: The new value. Required for `add` and `replace`, and omitted for
            `remove`. A group name for `/name`, or a `scope:value` external ID
            for `/externalIds`.
          minLength: 1
          maxLength: 45
          pattern: ^([\w \-.&()]{1,32}|[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+)$
    ProblemJson:
      title: ProblemJson
      description: JSON Schema for HTTP Problems as defined by RFC 9457
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: A URI reference that identifies the problem type.
          pattern: ^[^\n]*$
        title:
          type: string
          description: A short, human-readable summary of the problem type.
          minLength: 8
          maxLength: 1024
          pattern: ^[^\n]*$
        status:
          type: integer
          format: int32
          description: The HTTP status code generated by the origin server for this
            occurrence of the problem.
          minimum: 300
          maximum: 599
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
          minLength: 8
          maxLength: 2048
          pattern: ^[^\n]*$
        instance:
          type: string
          format: uri-reference
          description: A URI reference that identifies the specific occurrence of the
            problem.
          pattern: ^[^\n]*$
        pointer:
          type: string
          description: A pointer to locate the problem within the request's content using
            a JSON Pointer. Verizon extension to RFC 9457.
          minLength: 1
          maxLength: 2048
          pattern: ^(\/[^\n]+)*$
        debugId:
          type: string
          description: A unique error identifier string generated on the service-side and
            logged for correlation purposes. Verizon extension to RFC 9457.
          minLength: 8
          maxLength: 2048
          pattern: ^[^\n]*$
        errors:
          type: array
          description: List of individual error occurrences.
          minItems: 0
          maxItems: 50
          items:
            type: object
            additionalProperties: false
            required:
              - detail
            properties:
              pointer:
                type: string
                description: A pointer to locate the problem within the request's content using
                  a JSON Pointer.
                minLength: 1
                maxLength: 2048
                pattern: ^(\/[^\n]+)*$
              detail:
                type: string
                description: A human-readable explanation specific to this occurrence of the
                  problem.
                minLength: 8
                maxLength: 2048
                pattern: ^[^\n]*$
              debugId:
                type: string
                description: A unique error identifier generated on the service-side for
                  correlation purposes.
                minLength: 8
                maxLength: 2048
                pattern: ^[^\n]*$
  headers:
    ETag:
      description: Identifies the current version of the group. Treat it as a fixed
        value and do not change it. Send it in the `If-Match` header to update
        the group only if it has not changed. It is returned on every successful
        read, create and update of the group.
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 120
        pattern: ^"[a-z0-9-]+"$
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    PreconditionFailed:
      description: Precondition Failed
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    UnsupportedMediaType:
      description: Unsupported Media Type
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    UnprocessableContent:
      description: Unprocessable Content
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    TooManyRequests:
      description: Too Many Requests
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    InternalServerError:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
```
