---
search:
  tags:
    - Variant Templates
    - PUT
seo:
  description: >-
    Replaces the variant… Reference for the PUT
    /api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/templates
    endpoint in the Management API.
sidebar:
  label: Set product variant templates
  badge: PUT
title: Set product variant templates
type: openapi-operation
---
Replaces the variant templates for a product

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

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

Attribute template keys

- `attribute_template_keys` (string[], required)

Request body example:

```json
{
  "attribute_template_keys": [
    "string"
  ]
}
```

**Responses**

- `200` — Updated variant templates
- `400` — Invalid request
- `401` — Unauthorized access
- `404` — Attribute template not found
- `500` — Internal server error

Response example, 200:

```json
{
  "data": [
    {
      "attribute_template_id": "string",
      "created_at": "string",
      "id": "string",
      "template_key": "string",
      "template_name": "string",
      "updated_at": "string"
    }
  ],
  "details": [
    "string"
  ],
  "success": true
}
```
