Skip to main content
GET
Preview. This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive 403 mcp_not_enabled. See the preview overview.
Lists the folders in a repository, at every level, sorted by name. Build the tree from each folder’s parent_id: top-level folders have parent_id: null. Folders synced from a connected source are listed too. Use a folder’s id as folder_id in Add Documents, List Documents or Search Repository.

Authentication

Requires an API key, or an OAuth token with repositories:read.

Path parameters

string
required
The repository id.

Query parameters

string
Only the folders directly inside this folder. Leave it out to list every folder.
string
The cursor from the previous page.
integer
default:"50"
Folders per page, from 1 to 100.

Response

Returns 200 with a page of folders: id, name and parent_id. cursor is null on the last page.

Errors