The status column represents a label designation for your item(s). It can be used to denote the status of a particular item or hold any other custom labeling for the item. Each status column is a collection of indexes and their corresponding labels. You can filter, read, update, and clear the status column via the API.

Filtering the status 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 status column's supported operators and compare values.

Compare valuesDescriptionOperators
The label's indexItems with a specific label index. You can find the index by querying column's settings. - any_of: returns items with the specified index
- not_any_of: returns items without the specified index
5 Items with empty values.- any_of: returns items with empty values
- not_any_of: returns items without empty values
nullItems with empty values. -is_empty: returns items with empty values
- is_not_empty: returns items without empty values

Examples

The following example returns all items on the specified board with a blank status value.

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

Reading the status column

You can query the status column using the column_values object that enables you to return column-specific subfields by sending a fragment in your query. Values for the status column are of the StatusValue type.

query {
  items (ids:[1234567890, 9876543210]) {
    column_values {
      ... on StatusValue {
        index
        value
      }
    }
  }
}

Fields

FieldDescription
column Column!The column the value belongs to.
id ID!The column's unique identifier.
index IntThe column's status index in the board.
is_done BooleanWhether or not the item's status is done.
label StringThe column's status label value.
label_style StatusLabelStyleThe status label's style.
text StringThe column's value as text. This field will return null if the column has an empty value.
type ColumnType!The column's type.
update_id IDThe unique identifier of the update attached to the column's status.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.

Updating the status column

You can update a status column with both a simple string and a JSON string. The status column has a limit of 40 labels.

You can update a status column using the change_simple_column_value mutation and sending a simple string in the value argument. You can also use the change_multiple_column_values mutation and pass a JSON string in the column_values argument. Please note that status columns have a limit of 40 labels.

Simple strings

To update a status column, send the index of the status you want to set. If you don’t know the index of the label you’re trying to set, you can send the label instead. If you don't specify create_labels_if_missing: true in your query, the labels you send that don't exist already will not get created and your query will get an error containing all the existing labels and their indexes.

mutation {
  change_simple_column_value (item_id:9876543210, board_id:1234567890, column_id:"status", value: "8") {
    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!, $myColumnValue: String!, $columnId: String!) { change_simple_column_value (item_id:$myItemId, board_id:$myBoardId, column_id: $columnId, value: $myColumnValue) { id } }",
    variables : JSON.stringify({
      myBoardId: 1234567890,
      myItemId: 9876543210,
      columnId: "status",
      myColumnValue: "8"
      })
    })
  })

JSON

To update a status column with a JSON string, send the index of the status you want to set. If you don’t know the index of the label you’re trying to set, you can send the label instead. If you don't specify create_labels_if_missing: true in your query, the labels you send that don't exist already on the board will not get created, and your query will get an error containing all the existing labels and their indexes.

mutation {
  change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"status\" : {\"index\" : \"1\"}}") {
    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: "{\"status\" : {\"index\" : \"1\"}}"
    })
  })
})

Clearing the status column

You have two options to clear a status column. First, you can use the change_multiple_column_values mutation and pass null an empty string, or an empty object in the column_values argument.

mutation {
  change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"status\" : 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: "{\"date\" : null}"
    })
  })
})

You can also use the change_simple_column_value mutation and pass an empty string in the value argument.

mutation {
  change_simple_column_value(item_id:9876543210, board_id:1234567890, column_id: "status", value: "") {
    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!, $myColumnValue: String!, $columnId: String!) { change_simple_column_value (item_id:$myItemId, board_id:$myBoardId, column_id: $columnId, value: $myColumnValue) { id } }",
    variables : JSON.stringify({
      myBoardId: 1234567890,
      myItemId: 9876543210,
      columnId: "status",
      myColumnValue: ""
      })
    })
  })

Index values and color mapping

As mentioned above, you can use both Index and Label values when using JSON formatting in your Mutation calls to update the Status column.

  • change_column_value
  • change_multiple_column_values
  • create_item,create_subitem

By default, every index value matches a specific color. For example, the Green status has the index 1. Here's a full list of the indexes and matching values.

When you create a new Status label, it will follow the default index value and its index will not change. However, the color of a status label can be changed. Therefore, you cannot assume a label’s color and index will always match.

Take the following example:

Index: 2 will have a color value of #e2445c. Thus, using this index value will set the Status column value to a Red-shadow color, as shown below:

512

And on the board, this will appear as such:

The color values are not static and can be changed within the Status column labels. You can find more info on this here.

Then, the index value will remain the same, but the color value will be changed. For example, if I chose Black as the new color, this is how the color value would appear in the API:

And this is how the item would appear on the board:

As such, using index values does not guarantee that you will populate the same color values across multiple boards.

If you encounter a mismatch of index values when sending data between boards in your account, we recommend changing the color of the labels back to the default values manually.

📘

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