Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Problem sending callbaks

    Posted 06-05-2025 18:12

    MarceloDuran | 2017-12-13 23:08:02 UTC | #1

    Callback integration

    We are having some trouble trying to send a callback to the API: there are two options we are working on: </br> The first one

    Create a callback

    api/v2/conversations/callbacks (POST) This one looks pretty straightforward, the only problem we have found here is we are not including neither conversationId nor contactid, this schema only allows phone numbers , how does the plataform know which contact is related to the interaction since phone numbers are not unique in all contact lists? </br>

    The second one:

    Update a conversation by disconnecting all of the participants

    /api/v2/conversations/callbacks/{conversationId} (PATCH)

    (notice we are sending a conversationId here, we assume Purecloud is identifying the contact) Also we are sending something like this in the body:

    { "startTime": "2017-11-20T20:08:54.056Z", "participants": [ { "participantId": "e8d1d7fa-b706-4a07-8f67-7eeabffbf866", "wrapup": { "code": "2a4c6653-d6aa-4ba5-b77e-df940db4a56b", "name": "VOLVER A LLAMAR", "provisional": false }, "calls": { "state": "disconnected", "recording": true, "muted": true, "confined": true, "held": true }, "callbacks": { "state": "disconnected", "callbackNumbers": [ "0990322151", "0990322151", "0990322151" ], "callbackScheduledTime": "2017-11-22T21:20:00.000Z" } } ] }

    but the server is responding that the schema is not correct, we are including the two required fields ("startTime" and "participants"). Does anybody know what should we do, any help would be appreciated.

    Thanks.

    Reply: Sorry, I can't find where to reply the message.

    The answer that we've got from the sever is this: { "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "contextId": "cfb63c02-606b-417e-8a3e-27f2d7d34b84", "details": [], "errors": [] }

    Thanks so much for your concern


    tim.smith | 2017-12-13 15:57:47 UTC | #2

    Can you provide a correlation ID from the error response please?


    MarceloDuran | 2017-12-14 18:04:27 UTC | #3

    { "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "contextId": "cfb63c02-606b-417e-8a3e-27f2d7d34b84", "details": [], "errors": [] }


    tim.smith | 2017-12-14 18:32:46 UTC | #4

    The calls and callbacks properties must be arrays, not a single object. Check your request against the documentation/schema for the API request on the dev center. There was an issue that was recently fixed where it wasn't displaying arrays in the schema properly, but that is fixed now.


    MarceloDuran | 2017-12-14 20:10:23 UTC | #5

    Oh, I haven't realized it, you're right , thank you so much Tim. I'm gonna try again using an array.


    system | 2018-01-14 20:10:35 UTC | #6

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