I am trying to find the GET API that can be used to retrieve the reply emails information such as the From Address and the To address. I need to be able to pull more than jut one conversation at a time. Is there such an API?
Hi,
Assuming you have the conversationId
, you can use GET /api/v2/conversations/emails/{conversationId}.
If you don't have the conversationId
, you could use POST /api/v2/analytics/conversations/details/query with the following body to get all email messages for a particular interval. The maximum allowed interval is 30 days.
{
"interval": "2021-03-03T00:00:00.000Z/2021-03-17T00:00:00.000Z",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "email"
}
]
}
]
}
Thank you for your reply!
The first API has the issue of pulling one conversation at a time and we need to be able to pull a time frame.
The second API we are already using and it has all of the information for the email we receive, but it does not include all of the data for a reply we send to that received email.
Then the pattern of usage you'll need to apply is:
- Use POST /api/v2/analytics/conversations/details/query to get a list of all
conversationId
s for the time frame - For each
conversationId
, call GET /api/v2/conversations/emails/{conversationId}
There is no single API call that can get the level of information you require for multiple conversations at once. I hope this solution helps.
Thank you for the help! You have just confirmed the same information I was finding when looking through the APIs. I was just hoping that they would be another solution. Again Thank you!
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.