List library root
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Authorization: Bearer <token>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2"
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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.focal.inc/v1/folders', params: {space_id: '6916bc3d-e1ab-425b-ac25-eefada01a9a2'}, headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.focal.inc/v1/folders";
let querystring = [ ("space_id", "6916bc3d-e1ab-425b-ac25-eefada01a9a2"), ];
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2' \ --header 'Authorization: Bearer <token>'wget --quiet \ --method GET \ --header 'Authorization: Bearer <token>' \ --output-document \ - 'https://api.focal.inc/v1/folders?space_id=6916bc3d-e1ab-425b-ac25-eefada01a9a2'Browse the top level of a space’s media library: its root folders (no parent) and root media (not in any folder), returned together in one data array. Each entry carries a kind discriminant (folder or media); subfolders come first, then media. Drill into a folder with GET /v1/folders/{id}.
Media entries are lean references — type, format, media_type, ids and timestamps; fetch the full media (attributes, exports, signed download URL) via GET /v1/media/{id}.
The feed pages all subfolders before any media via an opaque cursor — treat next_cursor as opaque and pass it straight back.
Pass search to search the whole space by name instead of browsing the root level: folders anywhere in the space’s tree and library media whose name contains the term (case-insensitive), same shape and pagination.
Pass fields to trim the response to the properties you actually need — e.g. ?fields=name,html_url returns just those (plus id, always). Unknown names are rejected rather than ignored.
Required scope: media:read. Rate-limit cost: 5.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Max entries per page (1–100). Default 25.
Pagination cursor returned as next_cursor from the previous page.
Example
6916bc3d-e1ab-425b-ac25-eefada01a9a2Required. The single space to query, as a UUID. The API reads one space at a time — comma-separated lists and wildcards are not accepted, and there is no implicit default.
Search the whole space by name instead of browsing the root level: case-insensitive substring match (≤200 chars) against folders anywhere in the space’s tree and the space’s library media.
Return only these properties of each entry, instead of the full object. id is always included. Omit for the complete object. Selectable: kind, id, name, parent_id, space_id, total_media_count, organization_id, created_at, updated_at, html_url, type, format, media_type, folder_id.
Responses
Section titled “Responses”OK
object
object
Parent folder id; null for a top-level (root) folder.
Number of media in this folder and all its descendants (archived excluded).
Browser URL that opens this folder in the Focal web app’s library. Hand this to users as a clickable link.
object
File extension.
IANA media type derived from format.
Containing folder id; null at the space root.
Browser URL that opens this media in the Focal web app’s library. Hand this to users as a clickable link to the exact asset.
Pass back as cursor to fetch the next page. null on the last page.
true when another page is available. Equivalent to next_cursor !== null.
Example
{ "data": [ { "kind": "folder", "id": "80539d38-3a8e-48f8-929b-8c0e9a22ab43", "name": "Spring 2027", "parent_id": "eec32c6e-5ea9-4ea0-a34d-94363d51ba0b", "space_id": "6916bc3d-e1ab-425b-ac25-eefada01a9a2", "total_media_count": 14, "organization_id": "b46d9033-24b2-4441-87ad-2151088fde01", "created_at": "2027-03-04T10:15:00Z", "updated_at": "2027-03-06T14:42:00Z", "html_url": "https://app.focal.inc/spaces/6916bc3d-e1ab-425b-ac25-eefada01a9a2/library?folder=80539d38-3a8e-48f8-929b-8c0e9a22ab43" } ], "next_cursor": "eyJ0IjoiMjAyNy0wMy0wNFQxMDoxNTowMC4wMDBaIiwiaSI6Ijc4NmJlZWRhLTU1YWMtNDAyNS1iZjZlLTQzYjI5MThlODRhOSJ9", "has_more": true}The request was malformed (invalid cursor, unknown type, validation failure, etc.). error.code is bad_request.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "bad_request", "message": "Invalid request body", "details": [ { "field": "space_id", "issue": "Invalid UUID" } ] }}Missing, invalid, or disabled token. error.code is unauthenticated.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "unauthenticated", "message": "Bearer token is missing or invalid" }}The token doesn’t have the scope this endpoint requires. error.code is forbidden.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "forbidden", "message": "Token doesn't have the required scope" }}Resource doesn’t exist or is outside the token’s space allow-list. The two cases share a response shape so a restricted token can’t probe for the existence of out-of-scope spaces. error.code is not_found.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "not_found", "message": "Not found" }}Rate limit exceeded. error.code is rate_limited. Wait the number of seconds in the Retry-After header before retrying. Quotas are per-token; see the “Rate limiting” section at the top of this document.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "rate_limited", "message": "Rate limit of 1000 units per 60s exceeded (this request cost 5)" }}Headers
Section titled “Headers”Example
12Seconds to wait before retrying.