Email conversation is not pulling text body

Hi There,

We have a requirement to show an email body inside the app and to reply from the app as well.

As a result, the following api is used: /api/v2/conversations/emails/conversationId/messages

The above api should provide all of the email's data, including textBody and htmlBody (which contain the email's whole history, according to the document). However, we obtain all of the email details except textBody and htmlBody when we use this api.

Could you kindly assist us in obtaining the specifics of an email?

I learned that we need to pass historyIncluded should be true to get the details. However, no clue how to pass it to the api?

Thanks,
Jana.

Hello,

If you want each textBody/htmlBody of emails belonging to a thread, you have to do this in 2 steps.

You need to retrieve the list of message id's.
You can indeed leverage GET /api/v2/conversations/emails/{conversationId}/messages.
I am not aware of an historyIncluded parameter for that endpoint. Nothing like such is described in the Path parameters (in the link above).

Then you need to retrieve each message individually using GET /api/v2/conversations/emails/{conversationId}/messages/{messageId}.

That's what the Genesys Cloud Desktop does as well when the agent receives and accept an incoming email.

Regards,

hi Jerome,

Thanks for your quick response.

Looking at the API in question GET /api/conversations/emails/{conversationId}/messages, I think, we need to ensure the historyincluded section within the json is set to true, as below:

Thanks,
Jana.

That's the schema of the response - not the schema of the request.
This attribute is in the API Response.

Regards,

Thank you very much and appreciated!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.