emfasemfas
Category Trees{treeId}Categories{identifier}

Create Category in Tree

Creates a new category within a specific tree. Returns 409 if category already exists.

POST
/category-trees/{treeId}/categories/{identifier}
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Path Parameters

treeIdstring

Category tree identifier

identifierstring

Category identifier

Category data

displayName?string

Full hierarchical display name (e.g., "Electronics > Phones > iPhone"). If omitted, defaults to name.

name?string

Name of the category (required for create)

parentId?string

Parent category identifier within the same tree

Response Body

curl -X POST "https://api.emfas.ai/v1/category-trees/string/categories/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "result": {
    "displayName": "Electronics",
    "identifier": "electronics",
    "name": "Electronics",
    "parentId": "parent-cat-123",
    "treeId": "my-tree-123"
  }
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}