Deletes a List and all of its Contacts.


Deletes a List and all of its Contacts.

Top ↑


bool deleteList( string api_key, int list_id );


api_key (string)

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

list_id (int)

The ID of the List to delete.

Return Value

Returns true on success.


The following example deletes List 1234567 and all of its Contacts from the system.

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

$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('deleteList', $list_id);
    "id": 1,
    "method": "deleteList",
    "params": [
    "id": 1,
    "result": true,
    "error": null


Deleting a List will:

  • Permanently remove the List.
  • Delete all related Fields.
  • Delete all Contact information stored within it.
  • Delete all Notes associated with Contacts.
  • Delete any related statistical information.
  • Prevent Contacts from unsubscribing.
  • Delete all associated Web Forms.
  • Cause scheduled sends to this List to fail.

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.
313 Cannot Edit Account Lists list_id is an Account List. Account Lists cannot be deleted.
302 Undefined Error: Unable to delete list An internal error occurred.

See Also