Learn how to read, create, update, and delete folders using the monday.com platform API

Users can create folders to help organize their boards, dashboards, and workdocs within a workspace.

Queries

Required scope: workspaces:read

Querying folders will return metadata about one or a collection of folders. This method accepts various arguments and returns an array.

You can only query folders directly at the root, so it can't be nested within another query.

query {
  folders (workspace_ids: 1234567890) {
    name
    id
    children {
      id
      name
    }
  }
}
let query = "query { folders (workspace_ids: 1234567890) { name id children { id name }}}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following argument(s) to reduce the number of results returned in your folders query.

ArgumentDescription
ids [ID!]The specific folders to return.
limit IntThe number of folders to get. The default is 25 and the maximum is 100.
page IntThe page number to return. Starts at 1.
workspace_ids [ID]The unique identifiers of the specific workspaces to return. You can query [null] to return folders in the Main Workspace.

Fields

You can use the following field(s) to specify what information your folders query will return.

FieldDescription
children [Board]!The folder's contents, excluding dashboards and subfolders.
color FolderColorThe folder's color.
created_at Date!The folder's creation date.
id ID!The folder's unique identifier.
name String!The folder's name.
owner_id IDThe unique identifier of the folder's owner.
parent FolderThe folder's parent folder.
sub_folders [Folder]!The folders inside of the parent folder.
workspace Workspace!The workspace that contains the folder.

Mutations

Required scope: workspaces:write

Create a folder

The create_folder mutation allows you to create a new folder in a workspace via the API. You can also specify what fields to query back from the new folder when you run the mutation.

mutation {
  create_folder (name: "New folder", workspace_id: 1234567890) {
    id
  }
}
let query = "mutation { create_folder (name: \"New folder\" , workspace_id: 1234567890) { id }}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following arguments to define the new folder's characteristics.

ArgumentDescription
color FolderColorThe folder's color.
name String!The folder's name.
parent_folder_id IDThe ID of the folder you want to nest the new one under.
workspace_id IDThe unique identifier of the workspace to create the new folder in.

Update a folder

The update_folder mutation allows you to update a folder's color, name, or parent folder via the API. You can also specify what fields to query back from the updated folder when you run the mutation.

mutation {
  update_folder (folder_id: 1234567890, name: "Updated folder name") {
    id
  }
}
let query = "mutation { update_folder (folder_id: 1234567890, name: \"Updated folder name\") { id }}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following arguments to define the updated folder's characteristics.

ArgumentDescription
color FolderColorThe folder's color.
folder_id ID!The folder's unique identifier.
name StringThe folder's name.
parent_folder_id IDThe ID of the folder you want to nest the updated one under.

Delete a folder

The delete_folder mutation allows you to delete and folder and all its contents via the API. You can also specify what fields to query back from the deleted folder when you run the mutation.

mutation {
  delete_folder (folder_id: 1234567890) {
    id
  }
}
let query = "mutation { delete_folder (folder_id: 1234567890) { id }}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following arguments to specify which folder to delete.

ArgumentDescription
folder_id ID!The folder's unique identifier.

📘

Join our developer community!

We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎