Adding Emails to a List

Add multiple email/contact with associated fields to the specified list.


Function

  • addContacts()

Url

  • POST: /PuresendService/v1/addContacts

Parameters

  • listId: int
    • id of the list to which the email will be added to.
  • emailWithfieldValues: String[]
    • Email Address and Field values, split by comma.
    • Example: example@domain.com,field1,field2,field3
    • array of the field values as specified for the list. This will constitute one entry in the list.
  • allowDuplicates: boolean
    • insert an email even if it exists in the list specified.

Return

  • Contact[]:
    • The Array of Contact object that contain new contact Id.

Exception

  • Exception

Documentation

  • Add multiple email/contact with associated fields to the specified list.

Examples

{
    "listId" : 1234,
    "emailWithfieldValues": ["test-1@email.com,field1,field2,field3,,,,,,,,,,,,,,,,,", 
                             "test-2@email.com,field1,field2,field3,field4,,,,,,,,,,,,,,,,"],
    "allowDuplicates" : 0
}
[
    {
        "id": 123456790470504,
        "listId": 1234,
        "email": "test-1@email.com",
        "emailBounced": false,
        "optOut": false,
        "columnValues": [
            "field1",
            "field2",
            "field3",
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null
        ]
    },
    {
        "id": 123456790470505,
        "listId": 1234,
        "email": "test-2@email.com",
        "emailBounced": false,
        "optOut": false,
        "columnValues": [
            "field1",
            "field2",
            "field3",
            "field4",
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null
        ]
    }
]