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.
/api/v2/files/foldersYour 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
Workspace whose folders should be listed.
1 <= length <= 128Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.
length <= 4096Case-insensitive substring match against the folder name.
1 <= length <= 200Field 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.
"name""name" | "createdAt" | "updatedAt"Sort direction.
"asc""asc" | "desc"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.
"active""active" | "archived"Whether parentPath includes every descendant instead of direct children only.
"true" | "1" | "yes" | "on" | "y" | "enabled" | "false" | "0" | "no" | "off" | "n" | "disabled"Deepest level below parentPath to include when recursive is true.
1 <= value <= 64Response 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"
}
}