List Folders

List workspace file folders with parent-path filtering and sorting. Use scope=archived to find paths accepted by Restore Folder. Returns the complete set in one page; nextCursor is always null.

OAuth scope: api:read.

GET/api/v2/files/folders
X-API-Key<token>

Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.

In: header

Query Parameters

workspaceId*string

Workspace whose folders should be listed.

Length1 <= length <= 128
parentPath?Folder path input

Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.

Lengthlength <= 4096
search?string

Case-insensitive substring match against the folder name.

Length1 <= length <= 200
sortBy?string

Field used to sort the result. Sorting by name is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order.

Default"name"
Value in"name" | "createdAt" | "updatedAt"
sortOrder?string

Sort direction.

Default"asc"
Value in"asc" | "desc"
scope?string

Which lifecycle set to list: active (default) returns live folders only; archived returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.

Default"active"
Value in"active" | "archived"
recursive?string

Whether parentPath includes every descendant instead of direct children only.

Value in"true" | "1" | "yes" | "on" | "y" | "enabled" | "false" | "0" | "no" | "off" | "n" | "disabled"
depth?integer

Deepest level below parentPath to include when recursive is true.

Range1 <= value <= 64

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/files/folders?workspaceId=string" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": [
    {
      "name": "string",
      "path": "string",
      "parentPath": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}