- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2020 07:50 AM
HI Team,
I am getting 500 Internal Server error while sending Email API through Rest API explorer. Can you please let me know that Am I missing any configuration changes or any setting needs to enable or header related input at the time of calling Post Email API ?
Raw output:-
{ "error": { "message": "org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: com.glide.size_aware.SizeAwareServletInputStream@ba2498; line: 1, column: 2] (through reference chain: com.glide.email.service.Email[\"to\"])", "detail": "Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: com.glide.size_aware.SizeAwareServletInputStream@ba2498; line: 1, column: 2] (through reference chain: com.glide.email.service.Email[\"to\"]) Check logs for error trace or enable glide.rest.debug property to verify REST request processing" }, "status": "failure" }
Regards,
Manish
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2020 07:59 AM
Use beloe JSON payload to use Email API
{
"to": [
"josh.nee@servicenow.com",
"dave.slusherwt@servicenow.com"
],
"subject": "Test from the new Email API!",
"text": "This is pretty cool stuff",
"table_name": "incident",
"table_record_id": "d71f7935c0a8016700802b64c67c11c6"
}
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2020 07:59 AM
Use beloe JSON payload to use Email API
{
"to": [
"josh.nee@servicenow.com",
"dave.slusherwt@servicenow.com"
],
"subject": "Test from the new Email API!",
"text": "This is pretty cool stuff",
"table_name": "incident",
"table_record_id": "d71f7935c0a8016700802b64c67c11c6"
}
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2020 10:22 AM
Hi Sachin,
Thanks for your quick response and help. The above shared JSON code is working fine with Rest API explorer and also I modified above JSON code tested with my GMAIL account then I got 200 OK successful response as well as received email. I have shared the below output for other people reference purpose.
Regards,
Manish