Legacy Dev Forum Posts

 View Only

Sign Up

Add contacts to contact list using API

  • 1.  Add contacts to contact list using API

    Posted 06-05-2025 19:25

    WetkarS | 2024-01-30 18:50:07 UTC | #1

    I am trying to add contacts to a contact list i have created using below API.

    /api/v2/outbound/contactlists/{contactListId}/contacts

    Body:

    [ { "id": "", "contactListId": "3112670f-fa0d-400f-afad-a083b0fa6484", "data": { "Name": "Sannket_Wetkar", "Phone": "919833343349", "EmailID": "sannket.wetkar@tatacommunications.com", "Weight": "73", "Age": "32" }, "callable": true, "phoneNumberStatus": { "Phone": { "callable": true } }, "contactableStatus": { "": { "contactable": true } } } ]

    Error: { "message": "Value [] is not a valid property for object [OutboundMediaType]", "code": "invalid.property", "status": 400, "contextId": "339b0bec-f22b-4677-b550-3293b04e0c62", "details": [], "errors": [] }

    I checked for column names typo errors but there arent any.


    tim.smith | 2024-01-30 18:54:52 UTC | #2

    WetkarS, post:1, topic:24383
    "contactableStatus": { "": { "contactable": true } }

    You can find the documentation for this endpoint here: POST /api/v2/outbound/contactlists/{contactListId}/contacts. Specifically, the contactableStatus property is documented as:

    A map of media types (Voice, SMS and Email) to ContactableStatus, which indicates if the contact can be contacted using the specified media type.

    Instead of an empty string, you should use one of the documented key values.


    WetkarS | 2024-01-30 19:09:48 UTC | #3

    Thank You Tim for your response. Same result with Revised Body

    Revised Body:

    [ { "id": "", "contactListId": "3112670f-fa0d-400f-afad-a083b0fa6484", "data": { "Name": "Sannket_Wetkar", "Phone": "919833343349", "EmailID": "sannketwetkartatacommunicationscom", "Weight": "73", "Age": "32" }, "callable": true, "phoneNumberStatus": { "Phone": { "callable": true } }, "contactableStatus": { "EmailID": { "contactable": true, "columnStatus": { "EmailID": { "contactable": true } } } } } ]

    { "message": "Value [EmailID] is not a valid property for object [OutboundMediaType]", "code": "invalid.property", "status": 400, "contextId": "0603e9ae-8d99-4dc8-99a5-a544cd0287d2", "details": [], "errors": [] }


    tim.smith | 2024-01-30 19:16:54 UTC | #4

    Please read closely; EmailID is not mentioned anywhere.

    tim.smith, post:2, topic:24383

    A map of media types (Voice, SMS and Email) to ContactableStatus, which indicates if the contact can be contacted using the specified media type.


    WetkarS | 2024-01-30 19:45:24 UTC | #5

    Thank You..It worked !!


    system | 2024-03-01 19:45:53 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: 24383