Legacy Dev Forum Posts

 View Only

Sign Up

Fetch voicemail messageID from conversationID

  • 1.  Fetch voicemail messageID from conversationID

    Posted 06-05-2025 18:17

    DebrupRoyChowdhury | 2020-04-17 17:07:21 UTC | #1

    I have a use case where I need to fetch the messageID of a voicemail message. All I have is the conversationID. The voicemail message is created in a flow using the "Transfer to Voicemail" action with the transfer target set to a queue.

    Is it possible to search the voicemail message sent to a queue by the conversationID?

    This comment says it's not possible: https://developer.mypurecloud.com/forum/t/how-to-use-search-voicemails-api/6501/4?u=debrup_roy_chowdhury while this one says it is possible: https://developer.mypurecloud.com/forum/t/voicemail-search-all-voicemail-for-date-range/3481/4?u=debrup_roy_chowdhury

    I tried the /api/v2/voicemail/search API with this request:

    {
       "pageSize": 100,
       "pageNumber": 0,
       "query": [
          {
             "fields": ["conversationId"],
             "type": "EXACT",
             "value": "b8050c31-4806-4e79-b241-00c0ea30b77c"
          },
          {
             "fields": ["owner"],
             "type": "EXACT",
             "value": "ALL"
          }
       ]
    }

    I'm getting a blank response.


    Jerome.Saint-Marc | 2020-04-17 18:17:21 UTC | #2

    Hello,

    What the other posts are saying is that the GET /api/v2/voicemail/search only works if you have transferred the voicemail to a group or to a user.

    If you are transferring the voicemail to a queue, you can retrieve the voicemails using a GET /api/v2/voicemail/queues/{queueId}/messages You will then need to look for the one which has the conversationId you are looking for (in the HTTP Response Body/JSON).

    But you can also use the following: Retrieve the conversation with a GET /api/v2/conversations/{conversationId} Then, in the participants array, look for the one that corresponds to the customer. In the customer's participant structure, you should have a calls array AND a callbacks array. You can find your voicemail MessageId in the callback element in the array. I mean callbacks[0].voicemail.id.

    Regards,


    system | 2020-05-18 18:17:25 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: 7567