monday.com Tags are objects that help you group items from different groups or different boards throughout your account by a consistent keyword. Tag entities are created and presented through the “Tags” column.

You can learn more about this column type here.

📘

NOTE

When assigning a tag to an item, you must ensure the tag exists first. You can check this using a tags() query, or use the create_or_get_tag() mutation to create a tag without knowing if it already exists.

Tags Queries

Required scope: tags:read

Querying tags returns one, or a collection of the account's public tags. If you want to find tags that are stored on Shareable or Private Boards, you can use the boards query instead.

Public tags are the tags that appear on Main Boards, which are accessible to all Member and Viewer-level users by default. Below is an example of how to query public tags.

query {
    tags (ids: [1, 2, 4, 10]) {
        name
    }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YourSuperSecretAPIkey'
   },
   body: JSON.stringify({
     query : "query { tags (ids: [1, 2, 4, 10]) { name } }"
   })
  })
curl --location --request POST 'https://api.monday.com/v2' \
--header 'Authorization: YourSuperSecretAPIkey' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query { tags (ids: [1, 2, 4, 10]) { name } }"}'

This is different from querying private tags, as those would be board-specific. Thus, you will need to use the Boards query to query the Tags within that board. Below is an example of how to query private tags.

query {
    boards {
        tags {
            id
        }   
    }
}
let query = "query { boards { tags { 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":"query { boards { tags { id } } }"}'

Arguments

The following argument can reduce the number of tags returned.

Argument

Description

ids [Int]

A list of tags' identifiers.

Fields

The following fields will determine what information is returned from your tags queries.

Field

Description

color !String

The tag's color.

id !Int

The tag's unique identifier.

name !String

The tag's name.

Tags Mutations

Required scope: boards:write

Create or Get a Tag

The create_or_get_tag mutation allows you to create new tags or receive their data if they already exist.

📘

Note:

Private and Shareable boards will also have private tags, so if you wish to use your tags in a Private or Shareable board, use the board_id argument. No need to send this argument when sending mutations to Main boards.

mutation {
    create_or_get_tag (tag_name: "amazing") {
        id
    }
}
let query = "mutation { create_or_get_tag (tag_name: \"amazing\") { 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_or_get_tag (tag_name: \"amazing\") { id } }"}'

Arguments for Create or Get a Tag

The following create_or_get_tag() arguments define the new or existing tag characteristics.

Argument

Description

tag_name String

The new tag's name.

board_id Int

The Shareable or Private Board ID where the tag should be created (not needed for Main boards)

🚧

NOTE

In order to update a tags column, you must utilize the change_column_value() mutation.

Check out the Tags section for the correct formatting and for more information.


Did this page help you?