Items are grouped together in units called groups. Each board contains one or multiple groups, and each group can hold one or many items.

You can learn more about this object type here.

Groups Queries

Required scope: boards:read

query {
    boards (ids: 157244624) {
        groups (ids: status) {
            title
            color
            position
        }
    }
}
let query = "query { boards (ids: 157244624) { groups (ids: status){ title color position }}}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YourSuperSecretAPIkey'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query { boards (ids: 157244624) { groups (ids: status){ title color position }}}"'

Fields

Querying groups will return either one group or a collection of groups on a specific board.

Groups are available for querying through boards as well as items and contain the following fields which will determine the data returned.

Field

Field Description

Support Arguments

archived Boolean

Whether the group is archived or not.

color !String

The group's color.

deleted Boolean

Whether the group is deleted or not.

id !ID

The group's unique identifier.

items `[Item]

The items in the group.

Ids [Int]
limit Int
page Int
newest_first Boolean

position !String

The group's position on the board.

title !String

The group's title.

Groups Mutations

Required scope: boards:write

Duplicate Group

The duplicate_group() mutation duplicates a group with all of its items. After the mutation runs you can query back all the group data as shown in the querying groups section above.

mutation {
    duplicate_group (board_id: 12345678, group_id: "today", add_to_top: true) {
        id
    }
}
let query = "mutation { duplicate_group (board_id: 20178755, group_id: \"today\", add_to_top: true) { id } }";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YourSuperSecretAPIkey'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation { duplicate_group (board_id: 20178755, group_id: \"today\", add_to_top: true) { id } }"'

Arguments for Duplicate Group

The following duplicate_group() arguments define the type of duplication and the characteristics of the duplicated group.

Argument

Description

board_id !Int

The board's identifier.

group_id !String

The group's identifier.

add_to_top Boolean

Boolean to add new group to the top or bottom of the board.

group_title String

The group's title.

🚧

Mutation-specific rate limit

The duplicate_group mutation has an additional rate limit of 40 mutations per minute. If you exceed this limit, you will receive a response with a 429 status code, and the following error message: "Call limit exceeded for DuplicateGroup".

Create a Group

The create_group() mutation creates a new empty group. After the mutation runs, you can query back all the group data as shown in the querying groups section above.

Here is a code example of this mutation:

mutation {
    create_group (board_id: 12345678, group_name: "new group") {
        id
    }
}
let query = "mutation { create_group (board_id: 20178755, group_name: \"new group\") { id } }";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YourSuperSecretAPIkey'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation { create_group (board_id: 20178755, group_name: \"new group\") { id } }"'

Arguments for Create a Group

The following create_group() arguments define the new group's characteristics.

Argument

Argument

board_id !Int

The board's identifier.

group_name !String

The name of the new group.

Archive a Group

The archive_group() mutation archives a group with all of its items. After the mutation runs, you can query back all the group data as shown in the querying groups section above.

mutation {
    archive_group (board_id: 12345678, group_id: "today") {
        id
        archived
    }
}
let query = "mutation { archive_group (board_id: 20178755, group_id: \"today\") { id archived } }";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YourSuperSecretAPIkey'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation { archive_group (board_id: 20178755, group_id: \"today\") { id archived } }"}'

Arguments for Archive a Group

The following archive_group() arguments determine which group will be archived.

Argument

Description

board_id !Int

The board's identifier.

group_id !String

The group's identifier.

Delete a Group

The delete_group() mutation deletes a group with all of its items. After the mutation runs you can query back all the group data as shown in the querying groups section above.

mutation {
    delete_group (board_id: 12345678, group_id: "today") {
        id
        deleted
    }
}
let query = "mutation { delete_group (board_id: 20178755, group_id: \"today\") { id deleted } }";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YourSuperSecretAPIkey'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation { delete_group (board_id: 20178755, group_id: \"today\") { id deleted } }"}'

Arguments for Delete a Group

The following delete_group() arguments determine which group will be deleted.

Argument

Description

board_id !Int

The board's identifier.

group_id !String

The group's identifier.


Did this page help you?