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

# Create attribute group

`POST /v1/attribute-groups`

## Request

- Base URL: `https://sandbox.pismolabs.io/rules`
- URL: `https://sandbox.pismolabs.io/rules/v1/attribute-groups`
- Auth: HTTP bearer

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](ref:post-v1-accounts-flex-controls) or [Create customer flex control](ref:post-v1-customers-flex-controls) endpoint.

For more information, refer to the [Attribute groups](doc: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.dev/pismo/apis/core-platform-flex-controls.md) - [All operations](https://skmtc.dev/pismo/apis/core-platform-flex-controls/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/core-platform-flex-controls/revisions/f6ad29885c69?raw)
