curl --request GET \
--url https://api.omi.me/v1/dev/user/folders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omi.me/v1/dev/user/folders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omi.me/v1/dev/user/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omi.me/v1/dev/user/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omi.me/v1/dev/user/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.omi.me/v1/dev/user/folders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omi.me/v1/dev/user/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"icon": "<string>",
"id": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"conversation_count": 0,
"description": "<string>",
"is_default": false,
"is_system": false,
"order": 0
}
]{
"detail": "<string>"
}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.
curl --request GET \
--url https://api.omi.me/v1/dev/user/folders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omi.me/v1/dev/user/folders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omi.me/v1/dev/user/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omi.me/v1/dev/user/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omi.me/v1/dev/user/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.omi.me/v1/dev/user/folders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omi.me/v1/dev/user/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"icon": "<string>",
"id": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"conversation_count": 0,
"description": "<string>",
"is_default": false,
"is_system": false,
"order": 0
}
]{
"detail": "<string>"
}Authorizations
Send Authorization: Bearer <firebase_id_token>.
Response
Successful Response