Skip to main content
Use the Folders API to organize your library of queries and dashboards from code or from an AI agent. Create folder trees, rename and recolor folders, move folders, and file queries and dashboards into them. These are the same folders you see in the Dune app library, so a change made through the API appears in the app right away. The same operations are available as tools in the Dune MCP server.

Use Cases

  • AI Agents: Let an agent file the queries and dashboards it creates into the right folder, without manual cleanup afterwards.
  • Library Organization: Build a folder structure for a project or a client in one script.
  • Team Workflows: Keep team folders consistent across many members and many queries.
  • Cleanup: Find and remove old folders and the content inside them.

Behavior

  • A folder belongs to a personal or team library. The API key decides which library you work in.
  • Team folders need an editor or admin behind the API key to create, change, or delete them.
  • Folder names are unique per parent folder. Creating a folder that already exists returns 409 with folder_already_exists and the ID of the existing folder, so a retry can use it.
  • Deleting a folder that still holds content returns 409 with folder_not_empty and the counts, unless you pass recursive=true. A recursive delete archives the queries and dashboards inside, as it does in the Dune app.

List Folders

List folders at the top level or inside a parent folder, with item counts.

Get Folder

Get a folder with its subfolders, queries, and dashboards.

Create Folder

Create a folder at the top level or inside a parent folder.

Update Folder

Rename a folder or change its description, color, or icon.

Move Folder

Move a folder under another folder or to the top level.

Delete Folder

Delete a folder, or a folder and everything inside it.

Move Queries and Dashboards

File queries and dashboards into a folder, or take them out of folders.