POST /V1/products/attributes
POST /V1/products/attributes is a Magento 2 REST endpoint in the Catalog module. Save attribute data. Requires an admin Bearer token with ACL Magento_Catalog::attributes_attributes.
Last verified: against Magento 2.4.9.
Returns
Magento\Catalog\Api\Data\ProductAttributeInterface
Service contract
Magento\Catalog\Api\ProductAttributeRepositoryInterface::save
Authorization
Admin Bearer token with ACL:
- Magento_Catalog::attributes_attributes
Body parameters
Example request
Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.
Headers
Path
/V1/products/attributesBody
{
"attribute": {
"apply_to": [
{}
],
"attribute_code": "",
"attribute_id": 0,
"backend_model": "",
"backend_type": "",
"custom_attributes": [
{
"attribute_code": "",
"value": ""
}
],
"default_frontend_label": "",
"default_value": "",
"entity_type_id": "",
"extension_attributes": {},
"frontend_class": "",
"frontend_input": "",
"frontend_labels": [
{
"label": "",
"store_id": 0
}
],
"is_comparable": "",
"is_filterable": false,
"is_filterable_in_grid": false,
"is_filterable_in_search": false,
"is_html_allowed_on_front": false,
"is_required": false,
"is_searchable": "",
"is_unique": "",
"is_used_for_promo_rules": "",
"is_used_in_grid": false,
"is_user_defined": false,
"is_visible": false,
"is_visible_in_advanced_search": "",
"is_visible_in_grid": false,
"is_visible_on_front": "",
"is_wysiwyg_enabled": false,
"note": "",
"options": [
{
"is_default": false,
"label": "",
"sort_order": 0,
"store_labels": [
{
"label": "",
"store_id": 0
}
],
"value": ""
}
],
"position": 0,
"scope": "",
"source_model": "",
"used_for_sort_by": false,
"used_in_product_listing": "",
"validation_rules": [
{
"key": "",
"value": ""
}
]
}
}Related in Catalog
Other endpoints shipped by the same module.
/V1/categories
Retrieve list of categories
Catalog · Magento\Catalog\Api\CategoryManagementInterface::getTree
/V1/categories
Create category service
Catalog · Magento\Catalog\Api\CategoryRepositoryInterface::save
/V1/categories/:categoryId
Delete category by identifier
Catalog · Magento\Catalog\Api\CategoryRepositoryInterface::deleteByIdentifier
/V1/categories/:categoryId
Get info about category by category id
Catalog · Magento\Catalog\Api\CategoryRepositoryInterface::get
/V1/categories/:categoryId/move
Move category
Catalog · Magento\Catalog\Api\CategoryManagementInterface::move
/V1/categories/:categoryId/products
Get products assigned to category
Catalog · Magento\Catalog\Api\CategoryLinkManagementInterface::getAssignedProducts
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.