List Folders
Get all folders for the authenticated user.
This endpoint is strictly read-only and returns an empty list if the user has no folders.
Unlike the internal /v1/folders endpoint, it does NOT call initialize_system_folders,
because doing so under a conversations:read scope would silently write to Firestore
(violating the read-only contract) and opens a TOCTOU window where concurrent first
requests can race past the outer empty-check and create duplicate system folders.
System folders (Work, Personal, Social) are still initialized lazily through other paths:
- The mobile app calls the internal
GET /v1/folderswhenever the conversations screen is rendered (app/lib/pages/conversations/conversations_page.dart), which triggersinitialize_system_folderson first access. - The conversation post-processing pipeline calls
initialize_system_folderswhenever a new conversation is created (backend/utils/conversations/process_conversation.py).
In practice, any user who can issue a Developer API key has already gone through one of those paths, so the empty-list case here only affects users who have never opened the conversations tab nor created a single conversation.
Authorizations
Send Authorization: Bearer <omi_developer_api_key>.
Response
Successful Response