The text column contains any text data you want to be stored in a column on your board(s). It is similar to the long text column. Our API supports this column, so you can read and update the text column via the API.

Reading the text column

You can return the data in a text 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": "Insert text here.",
  "value": "\"Insert text here.\""
}

Updating the text column

You can update a text column with both a simple string and a JSON string.

Simple strings

To update the text column, send a simple String value.

For example: "Sample text"

JSON

To update the text column with a JSON value, send the value as a string.

For example: "\"Sample text\""

mutation {
  change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"text5\" : \"Sample text\"}") {
    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: "{\"text5\" : \"Sample text\"}"
    })
  })
})

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

Clearing the text column

You can clear the text column using a change_multiple_column_values or change_simple_column_value mutation like the ones below.

mutation {
  change_multiple_column_values(item_id: 2796683069, board_id: 2796683060, column_values: "{\"text\" : \"\"}") {
    id
  }
}
mutation {
  change_simple_column_value(item_id: 2796683069, board_id: 2796683060, column_id: "text", value: "") {
    id
  }
}

You can also find the Postman request to clear the text column here.

📘

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!