Vision 6


Unsubscribes a specific Contact from a List.


Unsubscribes a specific Contact from a List.

Top ↑


int unsubscribeContactById( string api_key, int list_id, int contact_id );


api_key (string)

A key for accessing the API. See Getting Started for more information.

list_id (int)

The ID of the List containing the Contact.

contact_id (int)

The ID of the Contact to unsubscribe.

Return Value

Returns the List ID on success.


In the example, Contact 234 is unsubscribed from List 1234567.


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

$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('unsubscribeContactById', $list_id, $contact_id);

JSON Request

    "id": 1,
    "method": "unsubscribeContactById",
    "params": [

JSON Response

    "id": 1,
    "result": 1234567,
    "error": null


The Contact will be added to the Unsubscriber List. By default, a Contact which has been added to the Unsubscriber List is not reuploaded.

The method will trigger associated Unsubscribe Campaign Events or Autoresponders.

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
304 Unable to Load Contact contact_id is not a valid Contact

See Also