NielsS | 2017-11-29 19:05:02 UTC | #1
I Tried to reply to a mail that is in a queue but get a malformed syntax error back.
URL: POST /api/v2/conversations/emails/10299845-c295-4933-a370-bd3f4dce5e51/messages
The code:
{ "to": { "email": "niels@cloudoe.nl", "name": "niels@cloudoe.nl" }, "from": { "email": "klantenservice@cloudoe.mypurecloud.ie", "name": "klantenservice@cloudoe.mypurecloud.ie" }, "subject": "test 18:06", "textBody": "Hi to reply\r\n" }
Response:
{ "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "contextId": "9b6adda2-b4ce-4401-a4d7-2dba8879737b", "details": [], "errors": [] }
What do I overlook?
tim.smith | 2017-11-29 20:39:52 UTC | #2
I'm assuming you copied the JSON example. There's currently a bug where the dev center and dev tools are not adding array brackets correctly for the examples. Be sure to review the actual schema documentation to put arrays where necessary. In your request, the to property should be an array of objects; it should not have an object assigned directly to the property.
system | 2017-12-30 20:39:22 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2164