Hi Team,
We are accessing Monday API to send data from Custom POC application to Monday.com board.
We are able to pass item name value via our code through API call
Running Code:
let query3 = ‘mutation{ create_item(board_id: 3106812303, item_name: “new item”) { id }}’;
fetch(“https://api.monday.com/v2”, {
method: ‘post’,
headers: {
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘YOUR_TOKEN’
},
body: JSON.stringify({
‘query’: query3
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));
but when we try to rest information of the board along with item name, it generates error.
Not Running Code:
let query3 = ‘mutation{ create_item(board_id: 3106812303, item_name: “new item”, column_values: “{“text”:“ready 3”}”) { id }}’;
fetch(“https://api.monday.com/v2”, {
method: ‘post’,
headers: {
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘YOUR_TOKEN’
},
body: JSON.stringify({
‘query’: query3
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));
error shows : {
“errors”: J
{
“message”: “Parse error on ":" (STRING) at 1, 88]”,
“locations”: {
{
“line”: 1,
“column”: 88
}
]
}
],
“account_id”: 8500196
}
Board Structure is :
Please suggest why this error came up.
Regards
Ashish Tiwari