---
title: "Update a customer group"
method: PUT
path: "/customers/groups/{id}"
tags: ["Admin Customer Groups"]
---

# Update a customer group

`PUT /customers/groups/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/customers/groups/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/customers/groups/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

System groups refuse code/is_user_defined changes (422). Only name can be updated for system groups.

## Path parameters

- `id` integer, required

## Request body

- object
  - `code` string
  - `name` string

## Response `200`

Customer group updated.

## Other responses

- `400`: Invalid input
- `404`: Not found
- `422`: Validation failure or immutable system-group field.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
