---
title: "Create a new customer group"
method: POST
path: "/customers/groups"
tags: ["Admin Customer Groups"]
---

# Create a new customer group

`POST /customers/groups`

## Request

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

New groups are always created with is_user_defined=1 (system groups cannot be created via API).

## Request body

- object
  - `code` string, required
  - `name` string, required

## Response `201`

Customer group created.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

---

[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)
