Create a new attribute for your active brand. This playground calls the live API and will modify your data.
Create a new global or family attribute for the active brand.
POST https://api.commerceclarity.com/api/2026-05/attributes/create| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Required | Human-readable attribute name. |
attribute_id | string | Required | Unique identifier for the attribute within the brand. |
type | string | Required | text, rich-text, number, boolean, single-select, multi-select. |
scope | string | Required | global or family. |
description | string | Optional | Optional attribute description. |
is_enabled | boolean | Optional | Whether the attribute is active. Default true. |
options | array | conditional | Required for single-select / multi-select. Array of { action, value, value_id? }. |
options[].action | string | Required | Use "new" when creating. |
options[].value | string | Required | Display label (e.g. "Red"). A normalised key is derived automatically. |
options[].value_id | string | Optional | Optional custom identifier for the option. |
family_ids | array | conditional | Required when scope = family. Family ids the attribute is linked to. |
curl -X POST "https://api.commerceclarity.com/api/2026-05/attributes/create" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Color",
"attribute_id": "color",
"type": "single-select",
"scope": "global",
"options": [
{ "action": "new", "value": "Red" },
{ "action": "new", "value": "Blue" }
]
}'
{
"success": true,
"data": {
"attribute": {
"_id": "507f1f77bcf86cd799439011",
"attribute_id": "color",
"name": "Color",
"type": "single-select",
"scope": "global",
"is_essential": false,
"options": {
"red": { "value": "Red" },
"blue": { "value": "Blue" }
},
"family_ids": [],
"brand_id": "507f1f77bcf86cd799439010",
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
}
}{
"success": false,
"message": "Validation error",
"errors": {
"attribute_id": ["The attribute_id has already been taken."]
}
}