> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/012_documents/018__list_user_folders.md).

# List User Folders

GraphQL endpoint: `/user`

Lists every document folder of the calling user. Each record references its parent folder via parentId, so the full folder tree can be reconstructed.

## Query

```graphql
query {
  folders {
    records { id name parentId }
  }
}

```

## Variables

```json
{}
```

## Response

```json
{
  "data": {
    "folders": {
      "records": [
        {
          "id": "00000000-0000-4000-8000-000000000001",
          "name": "Grandchild",
          "parentId": "00000000-0000-4000-8000-000000000002"
        },
        {
          "id": "00000000-0000-4000-8000-000000000002",
          "name": "Child",
          "parentId": "00000000-0000-4000-8000-000000000003"
        },
        {
          "id": "00000000-0000-4000-8000-000000000003",
          "name": "Top",
          "parentId": null
        }
      ]
    }
  }
}
```
