The tags column holds words and/or phrases that help you group your items using these keywords.

Our API fully supports the tags column, so you can read, update, and clear it via the API. You can also filter your items_page query results by the tags column.

Filtering the tags column

Using the items_page object, you can easily filter a board's items by specific columns or column values. The table below contains the tags column's supported operators and compare values.

OperatorsCompare values
any_of
  • The tag IDs to filter by
  • -1 (blank values
  • not_any_of
  • The tag IDs to filter by
  • -1 (blank values)
  • is_emptynull
    is_not_emptynull

    👍

    Pro tip

    items_page is only available in API version 2023-10 and later.

    Examples

    The following example returns all items on the specified board without tags.

    query {
      boards (ids: 1234567890) {
        items_page (query_params: {rules: [{column_id: "tags", compare_value: [-1], operator:any_of}]}) {
          items {
            id
            name
          }
        }
      }
    }
    

    Here's another example that filters out a single tag and only returns items on the specified board that don't have tag 543210.

    query {
      boards (ids: 1234567890) {
        items_page (query_params: {rules: [{column_id: "tags", compare_value: [543210], operator: not_any_of}]}) {
          items {
            id
            name
          }
        }
      }
    

    Reading the tags column

    You can query the tags column using the column_values object. The object has different fields based on which API version you are using. Column values v2 fields will be available in API versions 2023-10 and later, while column values v1 fields are only supported in versions 2023-07 and 2023-04.

    Column values v2

    The column_values object enables you to return column-specific subfields by sending a fragment in your query. Values for the tags column are of the TagsValue type.

    👍

    Pro tip

    column_values v2 fields are only available in API version 2023-10.

    query {
      items (ids:[1234567890, 9876543210]) {
        column_values {
          ... on TagsValue {
            tag_ids
            text
          }
        }
      }
    }
    

    Fields

    FieldDescription
    column Column!The column the value belongs to.
    id ID!The column's unique identifier.
    tag_ids [Int!]!The unique identifiers of the column's tags.
    text StringThe column's value as text.
    type ColumnType!The column's type.
    value JSONThe column's JSON-formatted raw value.

    Column values v1

    You can return the data in a tags column in two different formats when you query by column values. The text field will return the tag(s) as a simple string. The value field will return metadata about the tag(s) as a JSON string.

    🚧

    Removing column values v1 support

    column_values v1 fields will no longer be supported in API versions 2023-10 and later.

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

    Updating the tags column

    You can update a tags column using the change_multiple_column_values mutation and passing a JSON string in the column_values argument. Simple string updates are not supported.

    JSON

    To update a tags column, send the tag IDs in an array. Check out this mutation in action in our Postman library or follow along with these code samples!

    mutation {
      change_multiple_column_values(item_id:9876543210, board_id:1234567890, 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_HERE'
      },
      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: 1234567890,
          myItemId: 9876543210,
          myColumnValues: "{\"tags\" : { \"tag_ids\" : [295026, 295064]}}"
        })
      })
    })
    

    Clearing the tags column

    You can also clear a tags column using the change_multiple_column_values mutation and passing null or an empty object in the column_values argument.

    mutation {
      change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"tags\" : null}") {
        id
      }
    }
    
    fetch ("https://api.monday.com/v2", {
      method: 'post',
      headers: {
        'Content-Type': 'application/json',
        'Authorization' : 'YOUR_API_KEY_HERE'
      },
      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: 1234567890,
          myItemId: 9876543210,
          myColumnValues: "{\"tags\" : null}"
        })
      })
    })
    

    📘

    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! 😎