Legacy Dev Forum Posts

 View Only

Sign Up

Answer chat conversation via API (3rd party Chat)

  • 1.  Answer chat conversation via API (3rd party Chat)

    Posted 06-05-2025 18:14

    Spyros_Capetanopulos | 2018-10-16 13:37:54 UTC | #1

    Hello,

    I would like to know if you can answer a third party Chat interaction, through the PureCloud API, and how it can be done.

    I already know how to disconnect from the API, I just need to know how to answer the interaction and put a WrapUpCode.

    Thank you


    tim.smith | 2018-10-16 13:45:27 UTC | #2

    Use the same API for answering and setting the wrap up code that you do for disconnecting.


    Spyros_Capetanopulos | 2018-10-16 13:48:36 UTC | #3

    Thanks Tim,

    But how do I answer? Can you give me an example, or guide, to be able to do it, since in the body of the JSON?

    "state": "connected"

    But even so, the interaction does not connect me.

    If you can help me, I'll thank you very much.

    Thank you.


    tim.smith | 2018-10-16 13:52:36 UTC | #4

    Spyros_Capetanopulos, post:3, topic:3747
    "state": "connected"

    That's correct. Can you provide a correlation ID from the response where this isn't working?


    Spyros_Capetanopulos | 2018-10-16 14:06:17 UTC | #5

    This is what answers me:

    { "status": 400, "code": "bad.request", "message": "An empty list of conversations is invalid.", "contextId": "8dae319b-72a5-4453-ac71-a0defc9701bc", "details": [], "errors": [] }


    tim.smith | 2018-10-16 14:25:35 UTC | #6

    Wrong API. Use PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId} to pickup, disconnect, and set the wrap up code.

    Generally you shouldn't use PATCH /api/v2/conversations/chats/{conversationId}. That's primarily intended for disconnecting stuck conversations. It requires the permission conversation:communication:disconnect, which agents and normal users are typically not given because it allows them to disconnect any conversation in the org.


    system | 2018-11-16 14:25:37 UTC | #7

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