The story folders the API key's creator can open - the folder tree they see in the dashboard (an administrator's key sees every folder) - with each folder's path and who can open it, in the same shape as a version's folder. A parent they cannot open is left out of path, and the folder's parentId is then null. Use it to pick a folderId for GET /v2/versions. A key scoped to one story lists only the folder that story is in (none if it sits at the root).
GET
/v2/folders
curl \
--request GET 'https://api.storydoc.com/v2/folders' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"data": [
{
"id": "64f1c2a9e1b2c3d4e5f60718",
"name": "Enterprise",
"path": [
"Sales",
"Enterprise"
],
"parentId": "string",
"sharedWithEveryone": true,
"members": [
{
"name": "Dana Lee",
"email": "dana@company.com",
"role": "Owner"
}
]
}
]
}
Response examples (403)
{
"error": "Access denied"
}
Response examples (429)
{
"error": "Too many requests"
}
Response examples (500)
{
"error": "Error occured",
"errorId": "550e8400-e29b-41d4-a716-446655440000"
}