Vision 6


Edits one or more Contacts in a List.

The Vision6 REST API supports transactional methods that can be used to trigger time-sensitive and critical communications.
Examples are welcome packs, invoices (as attachments), statements, payment confirmations and password resets.


Edits one or more Contacts in a List.

Top ↑


object editContacts(
    string api_key,
    int list_id,
    array contacts,
  [ bool trigger_update_profile ] 

API Key Access Level required: Standard access


api_key (string)

The key required to access the API. See Getting Started for more information.

list_id (int)

The ID of the List containing the Contacts to update.

contacts (array)

An array containing one or more associative arrays of new Contact details. The Contact details are indexed using each of the Field names or Field Ids in the List and must contain an id index with the Contact's ID. See the examples below.

trigger_update_profile (bool - optional)

Set to true to trigger any Update Profile Campaign Events or Autoresponders.

Return Value

Returns an object of boolean values indexed by Contact ID, indicating the Contacts that were successfully updated.


In List 1234567, editContacts() changes the state Field to Queensland in Contact 123 and changes the email Field to in Contact 456.


$list_id = 1234567;     // can be obtained using searchLists()

$contacts = array();    // array of contacts to update
$contacts[] = array(
    'id'    => 123,     // required
    'State' => 'Queensland'
$contacts[] = array(
    'id'    => 456,     // required
    'Email' => ''
$contacts[] = array(
    'id'    => 789,     // required
    'field_19847' => ''

$api = new Api($url, 'YOURAPIKEY');
$edited_contacts = $api->invokeMethod('editContacts', $list_id, $contacts);

// loop over result
foreach ($edited_contacts as $contact_id => $success) {
    if ($success) {
        print "Contact ". $contact_id ." updated successfully\n";

JSON Request

    "id": 1,
    "method": "editContacts",
    "params": [
                "id": 123,
                "State": "Queensland"
                "id": 456,
                "Email": ""
                "id": 789,
                "field_19847": ""

JSON Response

    "id": 1,
    "result": {
        "123": true,
        "456": true,
        "789": true
    "error": null


The API does not check the mandatory value of List Fields when adding or editing Contacts.

Error Codes

This method may return the following error codes in addition to the standard error codes:

Code Error Description
303 Unable to Load List list_id is not a valid List
380 Invalid contact array specified contacts must be an array containing one or more associative arrays of contact details
370 No real contacts found when editing a contact Each array in contacts must have an id value specifying the Id for the Contact
320 Failed to Update any Contacts Typically returned if the Contact id is not valid or the email address and mobile number are not valid

See Also