# List categories

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

## `GET /categories`

**List categories**

Returns a flat list of all categories for your site. Use
`GET /categories/tree` for the nested hierarchy.

Required permissions: `categories.view`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | number | No | Number |
| `limit` | query | number | No | Number <= 100 |
| `search` | query | string | No | Full-text search query |
| `sortBy` | query | "created_at" \| "updated_at" \| "name" \| "slug" \| "display_order" | No | One of: created_at, updated_at, name, slug, display_order |
| `sortOrder` | query | "asc" \| "desc" | No | One of: asc, desc |
| `dateFrom` | query | string | No | Filter from date (ISO 8601) |
| `dateTo` | query | string | No | Filter until date (ISO 8601) |
| `slug` | query | string | No | URL-friendly identifier, unique per site and locale |
| `slugs` | query | string[] | No | Array of strings |
| `ids` | query | string[] | No | Array of strings |
| `excludeIds` | query | string[] | No | Array of strings |
| `parentId` | query | string \| null | No | Parent resource ID |
| `isRoot` | query | boolean | No | Boolean |
| `includeChildren` | query | boolean | No | Boolean |


### 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 \
  -H "Authorization: Bearer $API_TOKEN"
```

### Response Example

```json
{
  "data": [
    {
      "id": 1,
      "name": "Tutorials",
      "slug": "tutorials",
      "description": "Step-by-step guides and how-tos",
      "parentId": null,
      "locale": "en",
      "contentCount": 12,
      "createdAt": "2025-01-10T09:00:00.000Z"
    },
    {
      "id": 2,
      "name": "API Guides",
      "slug": "api-guides",
      "description": "REST API integration tutorials",
      "parentId": 1,
      "locale": "en",
      "contentCount": 5,
      "createdAt": "2025-01-12T14:00:00.000Z"
    }
  ],
  "meta": {
    "total": 8,
    "perPage": 15,
    "currentPage": 1,
    "lastPage": 1
  }
}
```

---