I am using powershell to automate smartsheet entries, I am able fetch sheet data but I am facing issues while adding a new row to the smartsheet.
$headers = @{
'Authorization' = 'Bearer <API token>'
'Content-Type' = 'application/json'
}
$body = @{
'columnId ' = '229799331424132'
'value' = 'true'
}
$puturi="https://api.smartsheet.com/2.0/sheets/7647453991200644/rows"
Invoke-RestMethod -Method post -Uri $puturi -Headers $headers -Body $body
using this API reference guide:
ERROR:
Invoke-RestMethod : {
"errorCode" : 1008,
"message" : "Unable to parse request. The following error occurred: Unrecognized token 'value': was expecting ('true', 'false' or 'null')\n at [Source: REST input; line: 1,
column: 7]",
"refId" : "1aipur5vacxtg"
}
At line:1 char:1