Add contact to contact list from data action error in contracts

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 Add contact to contact list from data action error validation 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,

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

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


BR

1 Like

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.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.