---
search:
  tags:
    - Attribute Templates
    - POST
seo:
  description: >-
    Creates a new attribute template that defines the structure… Reference for
    the POST /api/v1/{team_slug}/{app_slug}/attributes endpoint in the
    Management API.
sidebar:
  label: Create attribute template
  badge: POST
title: Create attribute template
type: openapi-operation
---
Creates a new attribute template that defines the structure and fields for attributes. Templates specify field types (image, text, html, boolean, number, color) and can be associated with resources like products, categories, or tags. Reserved field keys (key, name, description) cannot be used.

`POST /api/v1/{team_slug}/{app_slug}/attributes`

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

Attribute data

- `fields` (internal_pkg_webserver_v1.InputAttributeField[] | null)
- `filterable` (boolean)
- `key` (string, required) — Key of the attribute
- `name` (string, required) — Name of the attribute
- `resources` (string[] | null)
- `translatable` (boolean)
- `type` (string, required) — Name of the attribute

Request body example:

```json
{
  "fields": [
    {
      "key": "string",
      "name": "string",
      "type": "boolean"
    }
  ],
  "filterable": true,
  "key": "string",
  "name": "string",
  "resources": [
    "string"
  ],
  "translatable": true,
  "type": "string"
}
```

**Responses**

- `200` — Attributes
- `201` — Successful response
- `400` — Invalid request (e.g. bad UUID, validation error)
- `401` — Unauthorized access
- `500` — Internal server error

Response example, 200:

```json
{
  "data": {
    "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",
    "fields": [
      {
        "created_at": "string",
        "id": "string",
        "key": "string",
        "name": "string",
        "type": "string",
        "updated_at": "string"
      }
    ],
    "filterable": true,
    "id": "string",
    "key": "string",
    "name": "string",
    "resources": [
      "string"
    ],
    "translatable": true,
    "type": "string",
    "updated_at": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}
```
