Contact_Import

Contact_Import( string keyarray contactsstring source,optional struct optionalParameters)
 

Note: When using one of the API wrappers, you do not need to pass the API key. The wrapper will pass the key for you, your first parameter should be the second parameter in the signature.

Description

Import a collection of contacts. Can import up to 1000 contacts with a single call. This call can be used to import new contacts or update existing contacts. 

This method does not support resubscribing an unsubscribed contact.  Learn how to resubscribe a contact.

Parameters

  string key Your API key - used to authenticate your account
  array contacts Array of contact_hash items, as explained above
contacts is an array of structs, where each struct can contain:
- email => value
- customFieldToken => value
- customFieldId => value

Each contact_hash must have a valid email

Ex:
contacts = [
{"email":"test@mail2.com", "first_name":"Test", "last_name":"User"},
{"email":"support@mail2.com", 1:"Support", 2:"User"}
];
  string source A short description of the source of your contacts
optional bool triggerWorkflows Triggers all workflows for which the contact is eligible - defaults to false
optional struct optionalParameters A struct of optional parameters, see below for valid keys

optionalParameters can include:

array listIds Import these contacts into all of the specified lists
array groupIds Import these contacts into all of the specified lists
bool activateDeleted If this contact was already deleted, reactivate them - defaults to true
bool updateCustomFields If this contact already exists, replace custom field values with values provided - defaults to false

Return

struct Aggregate import results
 

Still need help? Contact Us Contact Us