The tags column holds words and/or phrases that help you group your items via these key words. Our API supports this column, so you can read and update the tags column via the API.

Reading the tags column

You can return the data in a tags column in two different formats. The text field will return the data as a simple string, and the value field will return the data as a JSON string.

{
  "text": "Tag1, Tag2",
  "value": "{\"tag_ids\":[15381852,15381854]}"
}

Updating the tags column

JSON

You can update a tags column with a JSON string. Simple string updates are not supported.

To learn more about querying and mutating tags with our API, check out this section here.

To update a tags column, send the tag IDs in an array.

For example: "{\"tag_ids\":[295026,295064]}"

mutation {
  change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"tags\" : {\"tag_ids\" : [295026,295064]}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id }}",
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      myColumnValues: "{\"tags\" : { \"tag_ids\" : [295026, 295064]}}"
    })
  })
})

You can find the Postman request to change the tags column here.

Clearing the tags column

You can clear the tags column using a change_multiple_column_values mutation.

mutation {
  change_multiple_column_values(item_id: 2973227073, board_id: 2973227049, column_values: "{\"tags\" : {}}") {
    id
  }
}

πŸ“˜

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!