# Get category tree

**Publié le** : 2026-05-08
**Catégorie** : Core CMS

## `GET /categories/tree`

**Get category tree**

Returns categories as a nested tree structure, with each parent
containing its children. Useful for building navigation menus
and sidebar filters.

Required permissions: `categories.view`

### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |


### Examples

```bash
curl https://api.lynkow.com/v1/categories/tree \
  -H "Authorization: Bearer $API_TOKEN"
```

### Response Example

```json
{
  "data": [
    {
      "id": 1,
      "name": "Tutorials",
      "slug": "tutorials",
      "contentCount": 12,
      "children": [
        {
          "id": 2,
          "name": "API Guides",
          "slug": "api-guides",
          "contentCount": 5,
          "children": []
        },
        {
          "id": 3,
          "name": "Frontend",
          "slug": "frontend",
          "contentCount": 7,
          "children": []
        }
      ]
    },
    {
      "id": 4,
      "name": "News",
      "slug": "news",
      "contentCount": 18,
      "children": []
    }
  ]
}
```

---