Use this endpoint to create asynchronous background jobs that clear all contacts from an existing contact list.
Click a method to view its documentation
Privileges required: contacts:write
This endpoint clears (removes) all contacts from the contact list specified by listId in the lists
array in the JSON request body. See the example JSON Request below for details on constructing the JSON payload.
To see the status of an activity, make a GET call to the URI returned in the response's location header:
Location: https://api.constantcontact.com/v2/activities/<activity_id>
Poll this URI to monitor the activity status until the status is either COMPLETE or ERROR, indicating that the activity has completed processing. The response structure for this GET call is detailed here.
See also: Summary Activity Reports API
POST: https://api.constantcontact.com/v2/activities/clearlists |
|||
name |
type |
default |
description |
---|---|---|---|
api_key |
query |
REQUIRED; The API key for the application |
{ "lists":[ "2", "3" ] }
code |
description |
---|---|
201 |
Request was successful |
400 |
Bad Request; Error in validating a contact |
401 |
Authentication failure |
429 |
We couldn't complete your request because you have too many other requests in progress. Please try again later. |
500 |
Internal server error occurred |
property |
type(max length) |
description |
---|---|---|
lists |
array |
REQUIRED. An array of listIds that specify the contact lists to clear all contacts from |
property |
type(max length) |
description |
---|---|---|
contact_count |
string |
Displays the number of contacts that were processed, and is meaningful only after the activity is completed; the value is not predictable if the activity has not yet been processed. (Read Only) |
error_count |
string |
Displays the number of errors encountered, and is meaningful only after the activity is completed; the value is not predeictable if the activity has not yet been processed. (Read Only) |
id |
string |
Unique ID for the activity (Read Only) |
type |
string |
CLEAR_CONTACTS_FROM_LISTS - removes all contacts from the contactlist(s) specified in the import file (Read Only) |
{ "id": "a07e1il97rdhddlqqv9", "type": "CLEAR_CONTACTS_FROM_LISTS", "error_count": 0, "contact_count": 627 }