---
title: "List folders"
method: GET
path: "/directory/v1/folders"
tags: ["Directory (Sites)"]
---

# List folders

`GET /directory/v1/folders`

## Query parameters

- `page_size` integer
- `page_token` string
- `order_by.sort_field` 'SORT_FIELD_UNSPECIFIED' | 'SORT_FIELD_NAME' | 'SORT_FIELD_FOLDER_ID' | 'SORT_FIELD_USER_ID' | 'SORT_FIELD_CREATED_AT' | 'SORT_FIELD_MODIFIED_AT'
- `order_by.sort_order` 'SORT_ORDER_UNSPECIFIED' | 'SORT_ORDER_ASCENDING' | 'SORT_ORDER_DESCENDING'
- `only_leaf_nodes` boolean
- `with_ancestors` boolean
- `include_deleted` boolean
- `ignore_folders_disabled` boolean
- `domain` string

## Response `200`

A successful response.

- S12DirectoryV1GetFoldersResponse — Result returned from `GetFoldersResponse`
  - `folders` S12DirectoryV1Folder[] — The list of folders belonging to the organisation specified in the request.
    - `id` string — An unique identifier for the folder. Must be a valid UUID. For example: '00001d65-d336-485a-8331-7b53f37e8f51'
    - `name` string — Name associated with folder
    - `org_id` string — The organisation that the folder belongs to
    - `creator_id` string — The user id responsible for creating the folder For example: 'user_5441fffcde344415bb7ccaceda27e196'
    - `created_at` string, date-time — The creation timestamp of the folder (Date, Time, Timezone) For example: '2020-04-28T04:14:31:00Z'
    - `modified_at` string, date-time — The timestamp of the last modification for the folder (Date, Time, Timezone) For example: '2020-04-28T04:14:00Z'
    - `meta_label` string — Additional meta information that can be associated with the folder e.g. 'location'
    - `members_count` integer — The number of users with a direct association of type 'MEMBER' for the folder
    - `deleted` boolean — Whether a folder has been marked as deleted or not.
  - `next_page_token` string — Optional. base64 encoded. If this field is present, the value should be used in subsequent calls to GetFolders to get the next page of results. Otherwise, no further calls should be made.
  - `folders_with_ancestors` S12DirectoryV1FolderWithAncestors[] — When with_ancestors is true, folders with ancestors will be returned instead of an array of folders
    - `folder` S12DirectoryV1Folder — Folder represents the main directory object
      - `id` string — An unique identifier for the folder. Must be a valid UUID. For example: '00001d65-d336-485a-8331-7b53f37e8f51'
      - `name` string — Name associated with folder
      - `org_id` string — The organisation that the folder belongs to
      - `creator_id` string — The user id responsible for creating the folder For example: 'user_5441fffcde344415bb7ccaceda27e196'
      - `created_at` string, date-time — The creation timestamp of the folder (Date, Time, Timezone) For example: '2020-04-28T04:14:31:00Z'
      - `modified_at` string, date-time — The timestamp of the last modification for the folder (Date, Time, Timezone) For example: '2020-04-28T04:14:00Z'
      - `meta_label` string — Additional meta information that can be associated with the folder e.g. 'location'
      - `members_count` integer — The number of users with a direct association of type 'MEMBER' for the folder
      - `deleted` boolean — Whether a folder has been marked as deleted or not.
    - `ancestors` S12DirectoryV1Folder[] — The folders ancestors. For example, when returning a `location` leaf node, the ancestors will be the [`area`,`region`] folders, when applicable
      - `id` string — An unique identifier for the folder. Must be a valid UUID. For example: '00001d65-d336-485a-8331-7b53f37e8f51'
      - `name` string — Name associated with folder
      - `org_id` string — The organisation that the folder belongs to
      - `creator_id` string — The user id responsible for creating the folder For example: 'user_5441fffcde344415bb7ccaceda27e196'
      - `created_at` string, date-time — The creation timestamp of the folder (Date, Time, Timezone) For example: '2020-04-28T04:14:31:00Z'
      - `modified_at` string, date-time — The timestamp of the last modification for the folder (Date, Time, Timezone) For example: '2020-04-28T04:14:00Z'
      - `meta_label` string — Additional meta information that can be associated with the folder e.g. 'location'
      - `members_count` integer — The number of users with a direct association of type 'MEMBER' for the folder
      - `deleted` boolean — Whether a folder has been marked as deleted or not.
    - `members_count` integer — Members count are the count of active users associated with the folder.
    - `has_children` boolean — Whether the folder has children or not
  - `folders_enabled` boolean — Whether or not the org settings setting is enabled.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/safetyculture/apis/safetyculture-api.md) · [All operations](https://skmtc.net/safetyculture/apis/safetyculture-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safetyculture/safetyculture-api/revisions/5be91df61ded/schema)
