This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Add Comment to incident via API in powershell getting 400 error

When I try to add a Comment to an Incident, a 400 error is returned.  I used test-json to verify the body of my API Post is valid.


Any thoughts?  Here is what I have:

$Token = "our token"

$uri = "https://api.samanage.com/incidents/56982732/comments.json"
$headers_json = @{"X-Samanage-Authorization" = "Bearer $token"
"Accept" = "application/vnd.samanage.v2.1+json"
"Content-Type" = "application/json"}
$Body = @"
{

"comment":{

"body":"Test API",

"is_private":"false",

"commenter":"laredodave@domain.com",

}

}
"@

Invoke-RestMethod -Method Post -Headers $headers_json -Uri $uri -Body $Body