Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

Set post-call actions for voice calls using public APIs

  • 1.  Set post-call actions for voice calls using public APIs

    Posted 01-13-2026 08:52

    There is this new feature in this week's release notes. However in release notes there is no information which public API endpoint can be used for this. Anyone knows?


    #Roadmap/NewFeatures

    ------------------------------
    Armands Bunkovskis
    Adventus Solutions Sia
    ------------------------------


  • 2.  RE: Set post-call actions for voice calls using public APIs

    Posted 01-13-2026 17:16

    Hello Armands,

    You can always check the API Explorer for all of our publicly available API endpoints. I will look internally to see if we have a list of which APIs were released.



    ------------------------------
    Jason Kleitz
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: Set post-call actions for voice calls using public APIs

    Posted 01-16-2026 11:08
    Hello, 

    The APIs are live and released, but have not been marked as public in the API documentation.  This is in-progress and will publish in the coming days.  In the meantime, here is information on the endpoints and how to invoke them:


    DELETE
    /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/postflowaction
    Remove mandatory post call actions.

    Required Permissions

    Apps making this request must have ANY of these permissions:

    • conversation:call:deleteMandatoryPostFlowAction

    Required Scopes

    Apps making this request must have any of these scopes:

    • conversations


    Parameter
    Location
    Description
    conversationId
    path
    (string, required) conversationId
    participantId
    path
    (string, required) participantId
    communicationId
    path
    (string, required) communicationId



    PATCH
    /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/postflowaction
    Set mandatory post call actions. If both values are null or blank error will occur.

    Required Permissions

    Apps making this request must have ANY of these permissions:

    • conversation:call:setMandatoryPostFlowAction

    Required Scopes

    Apps making this request must have any of these scopes:

    • conversations

    Request Parameters

    Parameter
    Location
    Description
    conversationId
    path
    (string, required) conversationId
    participantId
    path
    (string, required) participantId
    communicationId
    path
    (string, required) communicationId

    requestBody
    { "destination": "", "invocationData": "" }

    destination
    (string) The destination phone number or phone id to send the flow to after completion. If null or blank will not update.
    invocationData
    (string) The invocation data to send the destination after completion. If null or blank will not update. Invocation data is only supported when the destination is an Inbound Call flow or Voice Survey flow.






    ------------------------------
    Alan Lanteigne
    Senior Product Manager, Purecloud Sip, Media, Edge
    ------------------------------



  • 4.  RE: Set post-call actions for voice calls using public APIs

    Posted 01-20-2026 13:01

    Hello Mr. Lanteigne - hope all is well!

    Hoping to get a bit more detail on these new endpoints.  Would using these enable us to connect a call (for my use case, an OUTBOUND CAMPAIGN CALL) to a post-call survey without disconnecting the caller? (in lieu of asking the agent to transfer the call to a survey live?)

    Just to outline the desired workflow:
    1. Agent receives outbound campaign call and connects to a customer

    2. Calls is finished (but the customer is still on the line)

    3. Agent selects a specific wrap-up code and hits done (nothing really happens to the call quite yet)

    4. Agent disconnects the call from the UI.

    Do the new APIs intercede and ensure that the caller is not actually disconnected from the call and can be pushed into a call flow?

    Could you elaborate and possibly provide a bit more on how this might be setup?

    Thanks,

    Chris Bohlin



    ------------------------------
    Chris Bohlin
    SuccessKPI
    ------------------------------



  • 5.  RE: Set post-call actions for voice calls using public APIs

    Posted 01-20-2026 15:55

    Hello Chris, it's good to hear from you!

    Yes, that is the purpose of the MPCA's in general... during a call, you stage a post call action for a participant that fires when that participant becomes the last participant on the call.  Previously, you had to set them from within an IVR using the Set Post Flow action.  Now you can set them at any point during the call via the APIs.  In your scenario, if the call never used an IVR (typical for Outbound) you would want to invoke the new endpoint to set a post call action for the customer.  This is done BEFORE the agent disconnects (as early in the agent script as possible, so it is sure to happen even if the agent drops unexpectedly).

    It is very powerful --- and more flexible now that the endpoints are live!



    ------------------------------
    Alan Lanteigne
    Senior Product Manager, Purecloud Sip, Media, Edge
    ------------------------------



  • 6.  RE: Set post-call actions for voice calls using public APIs

    Posted 26 days ago

    Hi Alan Lanteigne,

    We are facing the same scenario as Chris. We would like to set a post-call action so that both callback and outbound calls are transferred to the survey flow.
    I attempted to use a trigger to initiate the call when the user starts dialing and then use that workflow to set the post-flow action via the API; however, this does not work as expected.

    Could you please advise if there is a recommended or supported approach to fulfill this requirement?




    ------------------------------
    Ye Yi
    Technical Specialist
    ------------------------------



  • 7.  RE: Set post-call actions for voice calls using public APIs

    Posted 25 days ago

    Hello @Ye Yi!

    The important thing is that you have to know the conversationId, participantId, and communicationId of the participant you want to set the post call action for at the time you invoke the API.  This means all of that must exist, of course, so your request must be made after it is established.  I would code the workflow such that it does not attempt the request until it successfully gathers that information.



    ------------------------------
    Alan Lanteigne
    Senior Product Manager, Purecloud Sip, Media, Edge
    ------------------------------



  • 8.  RE: Set post-call actions for voice calls using public APIs
    Best Answer

    Posted 26 days ago

    The docs are live!

    https://developer.genesys.cloud/devapps/api-explorer#patch-api-v2-conversations-calls--conversationId--participants--participantId--communications--communicationId--postflowaction

    https://developer.genesys.cloud/devapps/api-explorer#delete-api-v2-conversations-calls--conversationId--participants--participantId--communications--communicationId--postflowaction



    ------------------------------
    Alan Lanteigne
    Senior Product Manager, Purecloud Sip, Media, Edge
    ------------------------------



  • 9.  RE: Set post-call actions for voice calls using public APIs

    Posted 25 days ago
    Edited by Alan Lanteigne 25 days ago

    I had a few inquiries asking for examples of invoking the new endpoints, specifically how to get the required parameters of communicationId and participantId.  Here is a quick walkthrough showing how I did it for myself on an active call.  

    Using the Postflow Action APIs (PATCH / DELETE)

    The new postflow action APIs require three identifiers:

    • conversationId

    • participantId

    • communicationId

    All three are discoverable from a standard
    GET /api/v2/conversations/{conversationId} call.

    This post walks through the full flow end-to-end.


    1. Get the conversation and extract IDs

    Start by retrieving the conversation:

    GET /api/v2/conversations/fe00260d-2b3b-44ff-bc25-6008f321c168

    Example (abridged) response:

    {
      "id": "fe00260d-2b3b-44ff-bc25-6008f321c168",
      "participants": [
        {
          "id": "274fcbd9-4a70-4b8e-ba21-4962b49dbf33",
          "participantType": "Internal",
          "calls": [
            {
              "id": "0e912e6e-a165-40af-ac99-2300d38cd712"
            }
          ]
        },
        {
          "id": "568aeef9-663b-40f3-8eed-ba0298733191",
          "participantType": "External",
          "calls": [
            {
              "id": "59ff0880-edac-367c-a64f-341f057befbe"
            }
          ]
        }
      ]
    }

    From this response:

    • conversationId
      fe00260d-2b3b-44ff-bc25-6008f321c168

    • participantId (external participant in this example)
      568aeef9-663b-40f3-8eed-ba0298733191

    • communicationId (call under that participant)
      59ff0880-edac-367c-a64f-341f057befbe


    2. Set a postflow action (PATCH)

    Once you have the IDs, invoke the PATCH endpoint:

    curl -X PATCH \
      'https://api.inindca.com/api/v2/conversations/calls/fe00260d-2b3b-44ff-bc25-6008f321c168/participants/568aeef9-663b-40f3-8eed-ba0298733191/communications/59ff0880-edac-367c-a64f-341f057befbe/postflowaction' \
      -H 'Authorization: Bearer <ACCESS_TOKEN>' \
      -H 'Content-Type: application/json' \
      --data-raw '{
        "destination": "13175551212"
      }'

    Successful response

    • HTTP 202 Accepted

    • Empty response body


    3. Remove a postflow action (DELETE)

    The DELETE endpoint uses the same path and identifiers:

    curl -X DELETE \
      'https://api.inindca.com/api/v2/conversations/calls/fe00260d-2b3b-44ff-bc25-6008f321c168/participants/568aeef9-663b-40f3-8eed-ba0298733191/communications/59ff0880-edac-367c-a64f-341f057befbe/postflowaction' \
      -H 'Authorization: Bearer <ACCESS_TOKEN>'

    Successful response

    • HTTP 202 Accepted

    • Empty response body


    Summary

    Flow overview:

    1. GET the conversation

    2. Extract:

      • conversationId

      • participantId

      • communicationId

    3. PATCH to set a postflow action

    4. DELETE to remove it later if needed

    Both PATCH and DELETE return 202 Accepted with no response body on success.



    ------------------------------
    Alan Lanteigne
    Senior Product Manager, Purecloud Sip, Media, Edge
    ------------------------------



  • 10.  RE: Set post-call actions for voice calls using public APIs

    Posted 24 days ago

    Hi Alan Lanteigne,

    Thank you for your guidance. I followed the recommendations, and everything is now working as expected.



    ------------------------------
    Ye Yi
    Technical Specialist
    ------------------------------