Skip to content
Developers
Open app

List library root

GET
/v1/folders
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);
}

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.

limit
integer
>= 1 <= 100

Max entries per page (1–100). Default 25.

cursor
string

Pagination cursor returned as next_cursor from the previous page.

space_id
required
string format: uuid

Example

6916bc3d-e1ab-425b-ac25-eefada01a9a2

Required. 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
string
<= 200 characters

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.

fields
string

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.

OK

Media typeapplication/json
object
data
required
Array
Any of:
object
kind
required
string
Allowed values: folder
id
required
string format: uuid
name
required
string
parent_id
required

Parent folder id; null for a top-level (root) folder.

string format: uuid
nullable
space_id
required
string format: uuid
total_media_count
required

Number of media in this folder and all its descendants (archived excluded).

integer
organization_id
required
string format: uuid
created_at
required
string format: date-time
updated_at
required
string format: date-time
html_url
required

Browser URL that opens this folder in the Focal web app’s library. Hand this to users as a clickable link.

string
next_cursor
required

Pass back as cursor to fetch the next page. null on the last page.

string
nullable
has_more
required

true when another page is available. Equivalent to next_cursor !== null.

boolean

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.

Media typeapplication/json

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
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

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.

Media typeapplication/json

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
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

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.

Media typeapplication/json

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
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

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.

Media typeapplication/json

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
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

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.

Media typeapplication/json

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
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

Example

{
"error": {
"code": "rate_limited",
"message": "Rate limit of 1000 units per 60s exceeded (this request cost 5)"
}
}
Retry-After
integer
Example
12

Seconds to wait before retrying.