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.

📘

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

You can use tags at the root of your query or nest them within another query. Querying tags directly returns one or a collection of the account's public tags.

Public tags are the tags that appear on main boards, which are accessible to all member and biewer-level users by default.

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 } }"
   })
  })

If you want to find tags that are stored on shareable or private boards, you can use the boards query instead. 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)));

Arguments

The following argument can reduce the number of tags returned.

ArgumentDescription
ids [Int]A list of tags' identifiers.

Fields

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

FieldDescription
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.

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 } }"}'

You can find the Postman request to create a tag here.

Arguments for create or get a tag

The following arguments define the new or existing tag characteristics.

ArgumentDescription
tag_name StringThe new tag's name.
board_id IntThe shareable or private board ID where the tag should be created (not needed for main boards).

Update a tags column

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.

📘

Have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!