---
search:
  tags:
    - Variant Groups
    - POST
seo:
  description: >-
    Creates a variant group for a… Reference for the POST
    /api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups endpoint
    in the Management API.
sidebar:
  label: Create a variant group
  badge: POST
title: Create a variant group
type: openapi-operation
---
Creates a variant group for a product. Attributes are optional and can be set later.

`POST /api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups`

**Request body** (`application/json`, required)

Variant group

- `attribute_ids` (string[])
- `description` (string)
- `name` (string, required)
- `priority` (integer) — Will be set to the highest priority for the product if not provided
- `slug` (string, required)

Request body example:

```json
{
  "attribute_ids": [
    "string"
  ],
  "description": "string",
  "name": "string",
  "priority": 0,
  "slug": "string"
}
```

**Responses**

- `201` — Variant group created
- `400` — Invalid request or mismatched attributes
- `401` — Unauthorized access
- `404` — Attribute not found
- `500` — Internal server error

Response example, 201:

```json
{
  "data": {
    "attributes": [
      {
        "attribute_id": "string",
        "attribute_key": "string",
        "attribute_name": "string",
        "template_key": "string",
        "template_name": "string"
      }
    ],
    "channel_statuses": [
      {
        "channel_id": "string",
        "channel_slug": "string",
        "status": "string"
      }
    ],
    "created_at": "string",
    "description": "string",
    "id": "string",
    "images": [
      {
        "alt": "string",
        "app_id": "string",
        "attributes": [
          {
            "created_at": "string",
            "description": "string",
            "filterable": true,
            "id": "string",
            "key": "string",
            "name": "string",
            "template_key": "string",
            "template_name": "string",
            "translatable": true,
            "translations": {
              "description": [
                {
                  "id": "string",
                  "locale": "string",
                  "value": "string"
                }
              ],
              "name": [
                {
                  "id": "string",
                  "locale": "string",
                  "value": "string"
                }
              ]
            },
            "updated_at": "string",
            "values": {
              "property1": {
                "field_id": "string",
                "id": "string",
                "image_id": "string",
                "image_object": {
                  "alt": "string",
                  "app_id": "string",
                  "blurhash": "string",
                  "copyright": "string",
                  "custom": {
                    "property1": "string",
                    "property2": "string"
                  },
                  "folder_id": "string",
                  "id": "string",
                  "parent_id": "string",
                  "public": true,
                  "status": "string",
                  "title": "string",
                  "url": "string"
                },
                "translations": {
                  "value": [
                    {
                      "id": "string",
                      "locale": "string",
                      "value": "string"
                    }
                  ]
                },
                "type": "string",
                "value": "string"
              },
              "property2": {
                "field_id": "string",
                "id": "string",
                "image_id": "string",
                "image_object": {
                  "alt": "string",
                  "app_id": "string",
                  "blurhash": "string",
                  "copyright": "string",
                  "custom": {
                    "property1": "string",
                    "property2": "string"
                  },
                  "folder_id": "string",
                  "id": "string",
                  "parent_id": "string",
                  "public": true,
                  "status": "string",
                  "title": "string",
                  "url": "string"
                },
                "translations": {
                  "value": [
                    {
                      "id": "string",
                      "locale": "string",
                      "value": "string"
                    }
                  ]
                },
                "type": "string",
                "value": "string"
              }
            }
          }
        ],
        "blurhash": "string",
        "copyright": "string",
        "custom": {
          "property1": "string",
          "property2": "string"
        },
        "folder_id": "string",
        "id": "string",
        "parent_id": "string",
        "priority": 0,
        "public": true,
        "status": "string",
        "title": "string",
        "translations": {
          "alt": [
            {
              "id": "string",
              "locale": "string",
              "value": "string"
            }
          ],
          "copyright": [
            {
              "id": "string",
              "locale": "string",
              "value": "string"
            }
          ],
          "title": [
            {
              "id": "string",
              "locale": "string",
              "value": "string"
            }
          ]
        },
        "url": "string"
      }
    ],
    "name": "string",
    "priority": 0,
    "product_id": "string",
    "slug": "string",
    "tags": [
      {
        "attributes": [
          {
            "created_at": "string",
            "description": "string",
            "filterable": true,
            "id": "string",
            "key": "string",
            "name": "string",
            "template_key": "string",
            "template_name": "string",
            "translatable": true,
            "translations": {
              "description": [
                {
                  "id": "string",
                  "locale": "string",
                  "value": "string"
                }
              ],
              "name": [
                {
                  "id": "string",
                  "locale": "string",
                  "value": "string"
                }
              ]
            },
            "updated_at": "string",
            "values": {
              "property1": {
                "field_id": "string",
                "id": "string",
                "image_id": "string",
                "image_object": {
                  "alt": "string",
                  "app_id": "string",
                  "blurhash": "string",
                  "copyright": "string",
                  "custom": {
                    "property1": "string",
                    "property2": "string"
                  },
                  "folder_id": "string",
                  "id": "string",
                  "parent_id": "string",
                  "public": true,
                  "status": "string",
                  "title": "string",
                  "url": "string"
                },
                "translations": {
                  "value": [
                    {
                      "id": "string",
                      "locale": "string",
                      "value": "string"
                    }
                  ]
                },
                "type": "string",
                "value": "string"
              },
              "property2": {
                "field_id": "string",
                "id": "string",
                "image_id": "string",
                "image_object": {
                  "alt": "string",
                  "app_id": "string",
                  "blurhash": "string",
                  "copyright": "string",
                  "custom": {
                    "property1": "string",
                    "property2": "string"
                  },
                  "folder_id": "string",
                  "id": "string",
                  "parent_id": "string",
                  "public": true,
                  "status": "string",
                  "title": "string",
                  "url": "string"
                },
                "translations": {
                  "value": [
                    {
                      "id": "string",
                      "locale": "string",
                      "value": "string"
                    }
                  ]
                },
                "type": "string",
                "value": "string"
              }
            }
          }
        ],
        "created_at": "string",
        "filterable": true,
        "id": "string",
        "key": "string",
        "markets": [
          {
            "active": true,
            "country_codes": [
              "string"
            ],
            "created_at": "string",
            "currency_code": "string",
            "id": "string",
            "locale": "string",
            "name": "string",
            "slug": "string",
            "updated_at": "string"
          }
        ],
        "name": "string",
        "order": 0,
        "schedules": [
          {
            "add_category_names": [
              "string"
            ],
            "add_collection_names": [
              "string"
            ],
            "add_tag_names": [
              "string"
            ],
            "execute_at": "string",
            "finished_at": "string",
            "group_id": "string",
            "id": "string",
            "item_id": "string",
            "item_name": "string",
            "item_type": "string",
            "remove_category_names": [
              "string"
            ],
            "remove_collection_names": [
              "string"
            ],
            "remove_tag_names": [
              "string"
            ],
            "to_amount_cents_with_tax": 0,
            "to_market_id": "string",
            "to_market_status": "string",
            "to_on_sale": true,
            "to_sale_amount_cents_with_tax": 0,
            "to_start_sale_timestamp": "string",
            "to_status": "string",
            "to_stop_sale_timestamp": "string",
            "to_store_group_id": "string"
          }
        ],
        "status": "string",
        "translations": {
          "name": [
            {
              "id": "string",
              "locale": "string",
              "value": "string"
            }
          ]
        },
        "updated_at": "string"
      }
    ],
    "translations": {
      "description": [
        {
          "id": "string",
          "locale": "string",
          "value": "string"
        }
      ],
      "name": [
        {
          "id": "string",
          "locale": "string",
          "value": "string"
        }
      ],
      "slug": [
        {
          "id": "string",
          "locale": "string",
          "value": "string"
        }
      ]
    },
    "updated_at": "string",
    "variants": [
      {
        "id": "string",
        "status": "string",
        "variant_name": "string",
        "variant_number": "string"
      }
    ],
    "videos": [
      {
        "attributes": [
          {
            "created_at": "string",
            "description": "string",
            "filterable": true,
            "id": "string",
            "key": "string",
            "name": "string",
            "template_key": "string",
            "template_name": "string",
            "translatable": true,
            "translations": {
              "description": [
                {
                  "id": "string",
                  "locale": "string",
                  "value": "string"
                }
              ],
              "name": [
                {
                  "id": "string",
                  "locale": "string",
                  "value": "string"
                }
              ]
            },
            "updated_at": "string",
            "values": {
              "property1": {
                "field_id": "string",
                "id": "string",
                "image_id": "string",
                "image_object": {
                  "alt": "string",
                  "app_id": "string",
                  "blurhash": "string",
                  "copyright": "string",
                  "custom": {
                    "property1": "string",
                    "property2": "string"
                  },
                  "folder_id": "string",
                  "id": "string",
                  "parent_id": "string",
                  "public": true,
                  "status": "string",
                  "title": "string",
                  "url": "string"
                },
                "translations": {
                  "value": [
                    {
                      "id": "string",
                      "locale": "string",
                      "value": "string"
                    }
                  ]
                },
                "type": "string",
                "value": "string"
              },
              "property2": {
                "field_id": "string",
                "id": "string",
                "image_id": "string",
                "image_object": {
                  "alt": "string",
                  "app_id": "string",
                  "blurhash": "string",
                  "copyright": "string",
                  "custom": {
                    "property1": "string",
                    "property2": "string"
                  },
                  "folder_id": "string",
                  "id": "string",
                  "parent_id": "string",
                  "public": true,
                  "status": "string",
                  "title": "string",
                  "url": "string"
                },
                "translations": {
                  "value": [
                    {
                      "id": "string",
                      "locale": "string",
                      "value": "string"
                    }
                  ]
                },
                "type": "string",
                "value": "string"
              }
            }
          }
        ],
        "description": "string",
        "folder_id": "string",
        "id": "string",
        "path": "string",
        "public": true,
        "status": "string",
        "title": "string",
        "translations": {
          "description": [
            {
              "id": "string",
              "locale": "string",
              "value": "string"
            }
          ],
          "title": [
            {
              "id": "string",
              "locale": "string",
              "value": "string"
            }
          ]
        },
        "variants": [
          {
            "format": "string",
            "height": 0,
            "url": "string",
            "width": 0
          }
        ]
      }
    ]
  },
  "details": [
    "string"
  ],
  "success": true
}
```
