---
title: "Update/create an attribute group"
method: PATCH
path: "/api/rest/v1/attribute-groups/{code}"
tags: ["Attribute group"]
---

# Update/create an attribute group

`PATCH /api/rest/v1/attribute-groups/{code}`

This endpoint allows you to update a given attribute group. Know more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no attribute group exists for the given code, it creates it.

## Path parameters

- `code` string, required

## Request body

- object
  - `code` string, required — Attribute group code
  - `sort_order` integer — Attribute group order among other attribute groups
  - `attributes` string[] — Attribute codes that compose the attribute group
  - `labels` object — Attribute group labels for each locale
    - `localeCode` string — Attribute group label for the locale `localeCode`

## Response `201`

Created

## Other responses

- `204` — No content to return
- `400` — Bad request
- `401` — Authentication required
- `403` — Access forbidden
- `415` — Unsupported Media type
- `422` — Unprocessable entity

---

[API](https://skmtc.net/akeneo/apis/akeneo-pim-rest-api.md) · [All operations](https://skmtc.net/akeneo/apis/akeneo-pim-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeneo/akeneo-pim-rest-api/versions/d8bda9b93b59/schema)
