---
title: "Create attribute group"
method: POST
path: "/v1/attribute-groups"
tags: ["Attribute groups"]
---

# Create attribute group

`POST /v1/attribute-groups`

Create an attribute group, which is a set of values that can be shared across multiple flex controls within the organization. Once you create an attribute group, you reference it in flex controls in the `conditions` field in the [Create account flex control](https://developers.pismo.io/pismo-docs/reference/post-v1-accounts-flex-controls) or [Create customer flex control](https://developers.pismo.io/pismo-docs/reference/post-v1-customers-flex-controls) endpoint.

For more information, refer to the [Attribute groups](https://developers.pismo.io/pismo-docs/docs/attribute-groups) guide.

## Request body

- AttributeGroupObject — Attribute group object
  - `id` string, required — Attribute group ID, unique within the organization
  - `description` string, required — Short description of the attribute group
  - `type` 'merchant_id' | 'merchant_category_code', required — Flex control scope * `merchant_category_code`: Merchant category code (MCC) is a four-digit number assigned to a business by credit card companies. It is used to classify the business by the type of goods or services it provides. * `merchant_id`: Unique ID assigned to a merchant by the payment processor.
  - `values` string[], required — Attribute group values - Each value must be unique within the array - Maximum of 20,000 items - Each item must not exceed 15 characters

## Response `201`

OK. Successful attribute group creation.

- AttributeGroupObject — Attribute group object
  - `id` string, required — Attribute group ID, unique within the organization
  - `description` string, required — Short description of the attribute group
  - `type` 'merchant_id' | 'merchant_category_code', required — Flex control scope * `merchant_category_code`: Merchant category code (MCC) is a four-digit number assigned to a business by credit card companies. It is used to classify the business by the type of goods or services it provides. * `merchant_id`: Unique ID assigned to a merchant by the payment processor.
  - `values` string[], required — Attribute group values - Each value must be unique within the array - Maximum of 20,000 items - Each item must not exceed 15 characters

## Other responses

- `400` — Bad request. Validation error on request.
- `409` — Conflict.
- `500` — Internal server error.

---

[API](https://skmtc.net/pismo/apis/platform-authentication.md) · [All operations](https://skmtc.net/pismo/apis/platform-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pismo/platform-authentication/versions/935b62e16de4/schema)
