# Get Subcategories by Parent Id

{% hint style="warning" %}
All API requests should contain[ authorization headers.](https://developers.socialboards.com/docs/apis/tickets/authorization-headers)
{% endhint %}

#### Request&#x20;

```
GET /categories/{parentId}/subcategories?includeHidden={includeHidden}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>parentId</td><td>integer</td><td>no</td><td>Id of category which subcategories you want to receive. Without this parameter response will contain root categories</td></tr><tr><td>includeHidden</td><td>boolean</td><td>no</td><td>if set to <code>true</code> response will contain hidden categories. Default value is <code>false</code></td></tr></tbody></table>

#### Response

```json
{
    "data": [
        {
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": 35611,
            "id": 35795,
            "name": "ACME Corp"
        },
        {
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": 35611,
            "id": 35797,
            "name": "Dunder Mifflin Paper Co"
        },
        {
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": 35611,
            "id": 35796,
            "name": "Pawtucket Brewery"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type array of [Category ](https://developers.socialboards.com/docs/apis/tickets/reference/objects/category)objects.
