Legacy Dev Forum Posts

 View Only

Sign Up

Add contact to contact list from data action error in contracts

  • 1.  Add contact to contact list from data action error in contracts

    Posted 06-05-2025 18:46

    Marcelo_Casana | 2024-06-04 15:47:05 UTC | #1

    Hello everyone!

    I am having a problem when creating a data action to create a contact in a contact list for an outbound email campaign.

    This is the API i am using POST /api/v2/outbound/contactlists/{contactListId}/contacts

    This is my contract { "type": "array", "items": { "title": "Item 1", "type": "object", "properties": { "contactListId": { "type": "string" }, "data": { "type": "object", "properties": { "nombre": { "type": "string" }, "email": { "type": "string" }, "mensaje": { "type": "string" } }, "additionalProperties": true } }, "additionalProperties": true } }

    I was trying to do what the documentation says with the request body but I haven't found the solution, i followed this other topic https://developer.genesys.cloud/forum/t/add-contact-to-contact-list-from-data-action-error-validation/6211 but it is still not clear to me how the user achieved it. Could someone give me a hand to put together this data action?

    Thank you very much!

    Hope all have a great day

    Regards,


    Marcelo_Casana | 2024-06-04 16:23:53 UTC | #2

    And when I try to test it this is what it tells me


    AdrianRodriguezVar | 2024-06-05 07:34:22 UTC | #3

    Hi, I've created some similar, this is my schema

    BR


    Jason_Mathison | 2024-06-05 14:04:32 UTC | #4

    Input contracts can only be a flat object with key value pairs. No embedded objects or arrays. If the endpoint needs a complex object then you will need to build that with the request template.


    system | 2024-07-06 14:05:23 UTC | #5

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