Legacy Dev Forum Posts

 View Only

Sign Up

Error calling PostConversationsChats

  • 1.  Error calling PostConversationsChats

    Posted 06-05-2025 18:17

    robertosilva | 2020-04-22 11:02:54 UTC | #1

    Good Morning.

    I'm trying to post a chat conversation with the following parameter: createWebChatRequest.Provider = "PureCloud Webchat";

    With the code below:

    conversationsApi.Configuration.AccessToken = GetAccessToken (); createWebChatRequest.Provider = "PureCloud Webchat"; createWebChatRequest.QueueId = "bbfa456c-2617-4fea-89f8-2be722930a82"; createWebChatRequest.CustomerName = "External Chat Test"; chatConversation = conversationsApi.PostConversationsChats (createWebChatRequest);

    However I am getting the following error message: PureCloudPlatform.Client.V2.Client.ApiException: 'Error calling PostConversationsChats: {"message": "Bad Request", "code": "bad.request", "status": 400, "contextId": "4cc58f95-6a12- 4e3c-9359-93f5840ae1e3 "," details ": []," errors ": []} '

    Please, what am I doing wrong?

    Thank you very much.


    Jerome.Saint-Marc | 2020-04-22 11:48:45 UTC | #2

    Hello,

    It is not possible to create a PureCloud chat (Chat v1 or Chat v2) using the API - I mean using POST /api/v2/conversations/chats.

    You can only create "3rd party chat" conversation using this API method. If you use, "PureCloud Webchat" (for chat v1) or "PureCloud Webchat v2" (for Chat v2), the request will be rejected. See here for 3rd party chat/email routing: https://developer.mypurecloud.com/api/rest/v2/conversations/third-party-object-routing.html

    The purpose of this request is to allow you to create an interaction in PureCloud, seen as chat media type (from Agent Utilization point of view), which you can distribute via an ACD Queue to an agent, but with no chat protocol/messages going through PureCloud. Like a way to distribute "a 3rd party chat request" to an agent (with the need to implement the chat protocol/messages separately/outside of PureCloud).

    You can only create a chat:

    Regards,


    system | 2020-05-23 12:00:32 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: 7597