GET
/
folders
import { Dub } from "dub";

const dub = new Dub({
  token: "DUB_API_KEY",
});

async function run() {
  const result = await dub.folders.list();

  // Handle the result
  console.log(result);
}

run();
[
  {
    "id": "<string>",
    "name": "<string>",
    "type": "default",
    "accessLevel": null,
    "linkCount": 0,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

The search term to filter the folders by.

Whether to include the link count in the response.

page
number
default:1

The page number for pagination.

Required range: x > 0
Example:

1

pageSize
number
default:50

The number of items per page.

Required range: 0 < x <= 50
Example:

50

Response

200
application/json
A list of folders

The response is of type object[].