I guess that’s a pretty simple question, but I just can’t get it to work.
I want to make a simple API call to a ticket which adds a comment /note.
This is my call (POST): https://<mycompany>.freshservice.com/api/v2/tickets/<tickernumber>/notes
My JSON: { "body":"Hi tom, Still Angry" }
The response:
{
"description": "Validation failed",
"errors": [
{
"field": "body",
"message": "Unexpected/invalid field in request",
"code": "invalid_field"
}
]
}
curl --location --request POST 'https://<domain>.freshservice.com/api/v2/tickets/<ticket_id>/notes' \
--header 'Authorization: Basic <auth_details>' \
--form 'body="Hi Tom, I am still angry"' \
For a public note
curl --location --request POST 'https://<domain>.freshservice.com/api/v2/tickets/<ticket_id>/notes' \
--header 'Authorization: Basic <auth_details>' \
--form 'body="Hi Tom, I am still angry"' \
--form 'private="false"'