Skip to main content
GET
/
connections
/
{connection_id}
/
folders
JavaScript
import Hyperspell from 'hyperspell';

const client = new Hyperspell({
  apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});

const folders = await client.folders.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(folders.folders);
{
  "folders": [
    {
      "provider_folder_id": "<string>",
      "name": "<string>",
      "has_children": true,
      "parent_folder_id": "<string>",
      "policy": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "sync_mode": "sync"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.

Path Parameters

connection_id
string<uuid>
required

Query Parameters

parent_id
string | null

Parent folder ID. Omit for root-level folders.

Response

Successful Response

folders
FolderItem · object[]
required

Folders at this level