Legacy Dev Forum Posts

 View Only

Sign Up

Setting the recording deletion date based on e-mail receipt date

  • 1.  Setting the recording deletion date based on e-mail receipt date

    Posted 06-05-2025 18:12

    Brandy_Elias | 2017-11-25 21:02:34 UTC | #1

    Forgive me if this has already been discussed or is fairly simple to do as I am new to the API but we have some questions about setting the deletion date on recordings.

    Essentially we are trying to retroactively delete all e-mails after 180 days of receipt. As far as I understand, I need to use the recordings API for this and need the conversation ID and the recording ID, what I need to know is how I correlate the two and how to find the time the recording was created because we will use that to set the future deletion date.


    tim.smith | 2017-11-27 18:19:26 UTC | #2

    If you need to find conversation IDs, try the Analytics APIs, specifically a conversation detail query.

    Once you know a conversation ID, use GET /api/v2/conversations/{conversationId}/recordings to retrieve the recording IDs for the conversation. Note that there is no bulk resource for getting recording data for multiple conversations; requests must be made per conversation ID.


    Brandy_Elias | 2017-11-27 20:04:40 UTC | #3

    Hi Tim,

    Thank you for the response but that's not exactly what I'm after. I know how to pull the conversation IDs and the recording IDs, what I am having a hard time with is identifying which E-mail specifically the recording is associated with and what time the recording was created.

    The business case here is that we want to only set the recording deletion date on individual e-mails that are 180 days old.

    Looking at what we get back from GET /api/v2/conversations/{conversationId}/recordings, there is not enough detail there for us to set the delete date appropriately, as this is the only data that is returned:

    { "id": "conversationId": "media": "annotations": "fileState": "maxAllowedRestorationsForOrg": "remainingRestorationsAllowedForOrg": "sessionId": "selfUri": }


    tim.smith | 2017-11-27 21:30:15 UTC | #4

    Brandy_Elias, post:3, topic:2151
    what I am having a hard time with is identifying which E-mail specifically the recording is associated with and what time the recording was created.

    When you get results from the analytics conversation detail query, take note of the sessionId property for each participant's sessions. When you get recording results, compare the sessionId of the recording data with the sessionId of the analytics participant session. This will give you a 1:1 match between the recording metadata and the participant/session that it was recording.

    If you're wanting to compare with the message data (from GET /api/v2/conversations/emails/{conversationId}/messages) instead of analytics data, compare the email transcript's id property with the message's id property. This will give you a 1:1 match between the recording metadata and the email message object.

    To determine the recording time, inspect the property called time on the email transcript of the recording. You could also go by any of the timestamps on the conversation itself as the conversation's timestamp and the recording's timestamp won't be significantly different.


    system | 2017-12-28 21:28:14 UTC | #5

    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: 2151