Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  POST /uploads/v2/contactlist returns 200 OK even when upload fails

    Posted 4 days ago

    We noticed that when an import fails using the `POST /uploads/v2/contactlist` endpoint, the API response does not indicate that the import has failed. It responses with `200 OK`

    {
        "correlationId": "c5215965-a32a-4d99-aa27-223494254911"
    }

    According to Genesys Support, their backend logs show that the import generated the following event:

    * `eventId`: `5b800feb-b27f-52c1-b7a5-6d73264f2d10`
    * `category`: `IMPORT_ERROR`
    * `code`: `IMPORT_FAILED_TO_READ_HEADERS`

    The same error is also visible in the Genesys Cloud UI, where the contact list displays the message:"Import failed to read headers."

    However, our custom application, which initiates the contact list upload via the `POST /uploads/v2/contactlist` endpoint, always receives an HTTP `200 OK` response along with a correlation ID in the response body, regardless of whether the import succeeds or fails.

    Because the API response does not reflect the final import status, our application has no way to detect that the import failed and therefore cannot automatically retry the upload.

    Has anyone encountered this behavior? Is there a recommended way to determine whether an import has failed when using this endpoint? For example, is there an event, callback, or API that should be used to retrieve the final import status after receiving the initial `200 OK` response?

    P..S. Genesys Support advised to post this issue in here.


    #PlatformAPI

    ------------------------------
    Darius Arlauskas
    Written Communication Process Analyst
    ------------------------------


  • 2.  RE: POST /uploads/v2/contactlist returns 200 OK even when upload fails

    Posted yesterday

    Hi @Darius Arlauskas

    In my understanding, this is not a failure or error. The API just give feedback about upload process but not injection in the contact list. to the ge the real status you have to use another API:

    get /api/v2/outbound/contactlists/{contactListId}/importstatus
    Get dialer contactList import status.


    ------------------------------
    Saugort Dario Garcia
    Arquitecto de soluciones
    e-Contact
    https://www.e-contact.cl/
    ------------------------------



  • 3.  RE: POST /uploads/v2/contactlist returns 200 OK even when upload fails

    Posted 2 hours ago

    Hi @Darius Arlauskas,

    What you're seeing sounds like expected behavior for an asynchronous import process.

    The POST /uploads/v2/contactlist endpoint appears to acknowledge that the file upload request was accepted and therefore returns 200 OK with a correlationId. It does not necessarily indicate that the contact list import itself has completed successfully.

    To determine the actual outcome of the import, you should track the import status separately using:

    GET /api/v2/outbound/contactlists/{contactListId}/importstatus

    This endpoint can provide the final processing status and is likely the best approach for detecting failures such as IMPORT_FAILED_TO_READ_HEADERS.

    If your application needs automated retries, a common pattern would be:

    1. Submit the upload request.
    2. Store the correlation ID and contact list ID.
    3. Poll the Import Status endpoint until processing completes.
    4. Retry or raise an alert if the import ends in a failed state.

    It would be nice if the upload workflow exposed more explicit status tracking or event notifications, but since the import processing occurs after the initial upload is accepted, relying on the import status endpoint is probably the most reliable solution.

    Regards,



    ------------------------------
    Cesar Padilla
    INDRA COLOMBIA
    ------------------------------