/developers
Developer docsAtom Files ↗
← API referenceBrowse & search · API access unavailable
API REFERENCE / BROWSE & SEARCH

GET /v1/roots

List the folder roots this caller may enter, not every folder in the account.

Request fields

LocationFieldTypeRequiredDescription
HeaderAuthorizationstringYesCredential scoped to the authorized resource.
QuerylimitintegerNoPage size, 1–200; defaults to 100.
Querysortstring (enum)Noname_asc (default) or modified_desc.
Allowed values · closed enumname_ascmodified_desc
QuerycursorstringNoOpaque next-page cursor bound to this caller and sort order.

Request example

Example request
GET /v1/roots?limit=100&sort=name_asc
Authorization: Bearer <scoped token>

HTTP status codes

StatusMeaning
200 OKSuccess response shown below.
400 Bad RequestInvalid limit, sort, or pagination cursor.
401 UnauthorizedMissing, expired, or invalid credential.
403 ForbiddenCredential is valid but lacks the required scope or role.
410 GonePagination cursor expired; restart this listing.
429 Too Many RequestsRate limit reached; honor Retry-After when provided.
503 Service UnavailableService temporarily unavailable; retry safely.

Response fields

FieldTypeExample
itemsobject[][2 shown]
items[].idstringfolder_private
items[].typestring (enum)folder
Allowed values · closed enumfolder
items[].namestringMy files
items[].root_kindstring (enum)owned
Allowed values · closed enumownedsharedsource
items[].modified_atstring (date-time)2026-10-20T18:00:00Z
items[].grant_idstring | nullnull
next_cursorstring | nullnull

Response example

Example response
200 OK
Content-Type: application/json

{
  "items": [
    {
      "id": "folder_private",
      "type": "folder",
      "name": "My files",
      "root_kind": "owned",
      "modified_at": "2026-10-20T18:00:00Z",
      "grant_id": null
    },
    {
      "id": "folder_123",
      "type": "folder",
      "name": "Projects",
      "root_kind": "shared",
      "modified_at": "2026-10-19T18:00:00Z",
      "grant_id": "grant_123"
    }
  ],
  "next_cursor": null
}

How it works

Where browsing starts. GET /v1/roots returns only folders this token can enter: owned roots, shared folders, and accessible connected sources. A shared folder may be deep in its owner’s tree; private ancestors stay hidden. App labels such as PRIVATE, SHARED, and SOURCES are not folder IDs. Open a returned root with GET /v1/folders/{folder_id}/children.

How pages work. Both routes return items and next_cursor. Follow next_cursor until it is null. Keep the same sort while paging (name_asc by default, or modified_desc); changing sort starts a new listing. An item ID breaks ties. Folder children contain files and folders in one sorted list.

What if things change? Browsing is live. For example, if page one ends at M and Zebra is renamed Apple before page two, Apple may be missed because it moved before the cursor. De-duplicate by item ID and refresh after change notifications. Offline or connected-source edits appear only after their metadata syncs.

When to use a snapshot. Use GET /v1/changes/snapshot when starting a sync client that needs a complete metadata inventory. All its pages describe the same point-in-time view of metadata Atom has already indexed; the final page returns a cursor for subsequent changes. This does not lock the tree, include unsynced edits, or capture file bytes. Every request still checks current access, so revocation takes effect even if an older cursor exists.