emfasemfas
Category Trees

Create Category Tree

Creates a new category tree. Returns 409 if a tree with the same name already exists.

POST
/category-trees
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Category tree to create

identifier?string

Optional unique identifier for the tree. If omitted, a UUID will be auto-generated.

namestring

Display name for the category tree (required)

Response Body

curl -X POST "https://api.emfas.ai/v1/category-trees" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Categories"
  }'
{
  "result": {
    "id": "a1b2c3",
    "name": "Electronics"
  }
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}