Skip to content
Start here

Update deployment group

client.ZeroTrust.Devices.DeploymentGroups.Edit(ctx, groupID, params) (*DeploymentGroup, error)
PATCH/accounts/{account_id}/devices/deployment-groups/{group_id}

Updates a deployment group. Returns 409 if any newly added policy IDs already belong to another deployment group. This endpoint is in Beta.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
ParametersExpand Collapse
groupID string
params DeviceDeploymentGroupEditParams
AccountID param.Field[string]

Path param

Name param.Field[string]Optional

Body param: A user-friendly name for the deployment group.

maxLength255
minLength1
PolicyIDs param.Field[[]string]Optional

Body param: Replaces the entire list of policy IDs.

VersionConfig param.Field[[]DeviceDeploymentGroupEditParamsVersionConfig]Optional

Body param: Replaces the entire version_config array.

TargetEnvironment string

The target environment for the client version (e.g., windows, macos).

Version string

The specific client version to deploy.

ReturnsExpand Collapse
type DeploymentGroup struct{…}
ID string

The ID of the deployment group.

CreatedAt string

The RFC3339Nano timestamp when the deployment group was created.

Name string

A user-friendly name for the deployment group.

maxLength255
minLength1
UpdatedAt string

The RFC3339Nano timestamp when the deployment group was last updated.

VersionConfig []DeploymentGroupVersionConfig

Contains version configurations for different target environments.

TargetEnvironment string

The target environment for the client version (e.g., windows, macos).

Version string

The specific client version to deploy.

PolicyIDs []stringOptional

Contains a list of policy IDs assigned to this deployment group.

Update deployment group

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  deploymentGroup, err := client.ZeroTrust.Devices.DeploymentGroups.Edit(
    context.TODO(),
    "group_id",
    zero_trust.DeviceDeploymentGroupEditParams{
      AccountID: cloudflare.F("account_id"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", deploymentGroup.ID)
}
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "created_at": "2026-02-14T13:17:00.123456789Z",
    "name": "Engineering Ring 0",
    "updated_at": "2026-02-14T13:17:00.123456789Z",
    "version_config": [
      {
        "target_environment": "windows",
        "version": "2026.5.234.0"
      }
    ],
    "policy_ids": [
      "policy-uuid-1",
      "policy-uuid-2"
    ]
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "created_at": "2026-02-14T13:17:00.123456789Z",
    "name": "Engineering Ring 0",
    "updated_at": "2026-02-14T13:17:00.123456789Z",
    "version_config": [
      {
        "target_environment": "windows",
        "version": "2026.5.234.0"
      }
    ],
    "policy_ids": [
      "policy-uuid-1",
      "policy-uuid-2"
    ]
  },
  "success": true
}