Constant
Contact
API Guide
Bulk Activity EndpointsDelete Contact Lists Bulk Activity

Delete Contact Lists Bulk Activity

To create an asynchronous job that deletes up to 100 contact lists from an account, make a POST call to the /activities/list_delete endpoint and in the request body, specify the contact lists (list_ids) to delete.

Example Requests

POST
/activities/list_delete

Endpoint Requirements

User privileges: contacts:writeAuthorization scopes: contact_data
OkHttpClient client=new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType=MediaType.parse("application/json");
        RequestBody body=RequestBody.create(mediaType,"\t\n{\n  \"list_ids\": [\n    \"08936f78-662a-11eb-af0a-fa163e56c9b0\",\"205947ac-3f74-11ed-a450-074013d9081f\"\n  ]\n}");
        Request request=new Request.Builder()
        .url("https://api.cc.email/v3/activities/list_delete")
        .method("POST",body)
        .addHeader("Accept","*/*")
        .addHeader("Content-Type","application/json")
        .build();
        Response response=client.newCall(request).execute();

Example Response

{
  "activity_id": "0c2712b8-9700-11eb-a392-33d450967a54",
  "state": "initialized",
  "started_at": "completed",
  "completed_at": "2016-01-23T13:48:44.108Z",
  "created_at": "2016-01-23T13:48:44.108Z",
  "updated_at": "2016-01-23T13:48:44.108Z",
  "percent_done": 75,
  "activity_errors": [
    "Message describing the error condition."
  ],
  "status": {
    "list_count": 3
  },
  "_links": {
    "self": {
      "href": "/v3/activities/{activity_id}"
    }
  }
}

Checking the Activity Status for Job Complete

Check the activity status and when Constant Contact has completed processing an activity by making a GET call to /activities/{activity_id} using the activity_id located in the _links section of the response.

GET
https://api.cc.email/v3/activities/{activity_id}

Endpoint Requirements

User privileges: contacts:writeAuthorization scopes: contact_data
Try it!

On this page