Checkbox
The checkbox column represents a simple true or false value on a board. Our API supports this column, so you can read and update the checkbox column via the API.
Reading the checkbox column
You can return the data in a checkbox 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": "v",
"value": "{\"checked\":\"true\",\"changed_at\":\"2022-07-14T12:00:00.000Z\"}"
}
Updating the checkbox column
JSON
You can update a checkbox column with a JSON string. Simple string updates are not supported.
To check the box in the checkbox column, send: {"checked" : "true"}
mutation {
change_multiple_column_values(item_id: 1234567890, board_id: 1122334455, column_values: "{\"checkbox\" : {\"checked\" : \"true\"}}") {
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: 162169280,
myItemId: 162169283,
myColumnValues: "{\"checkbox\" : {\"checked\" : \"true\"}}"
})
})
})
You can find the Postman request to check a checkbox here.
Clearing the checkbox column
You can clear the checkbox column with a change_multiple_column_values
.
mutation {
change_multiple_column_values(item_id: 2973227073, board_id: 2973227049, column_values: "{\"check\" : null}"){
id
}
}
You can also find the Postman request to uncheck a checkbox 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!
Updated 3 days ago