Get a Contact List
Make a GET call to the /contact_lists/{list_id} endpoint to get details about a specific contact list (list_id). To
return the total number of all or active contact members on a list, set the include_membership_count query parameter
to either all or active. Use all to include all contacts. Use active to limit the total count to
include only active contacts (mailable contacts).
Example Request
This example request uses the include_membership_count query parameters.
https://api.cc.email/v3/contact_lists/{list_id}?&include_membership_count=activeEndpoint Requirements
User privileges: contacts:readAuthorization scopes: contact_dataOkHttpClient client=new OkHttpClient().newBuilder()
.build();
MediaType mediaType=MediaType.parse("application/json");
RequestBody body=RequestBody.create(mediaType,"");
Request request=new Request.Builder()
.url("https://api.cc.email/v3/contact_lists/123a3f10-01ab-11e6-8106-00163e6dbd8c?include_membership_count=active")
.method("GET",body)
.addHeader("Accept","*/*")
.addHeader("Content-Type","application/json")
.addHeader("Authorization","Bearer {access_token}")
.build();
Response response=client.newCall(request).execute();Example Response
{
"list_id": "123a3f10-01ab-11e6-8106-00163e6dbd8c",
"name": "Tier3",
"created_at": "2016-04-13T19:08:16Z",
"updated_at": "2016-04-13T19:08:16Z",
"favorite": false,
"membership_count": 25
}Response details include the following:
-
list_id: The list's unique ID. -
name: The name of the contact list. -
created_at: The system generated date and time that the resource was created, in ISO-8601 format. -
updated_at: The system generated date and time that the resource was last updated, in ISO-8601 format. -
favorite: Identifies whether or not the contact list was favorited. To favorite a list, make the PUT call to the/contact_lists/{list_id}endpoint and in the request body, setfavoritetotrue. -
membership_count: Includes the total contact membership count for the list.
What's Next
If you want to get contact details for a particular list, make a GET call to the /contacts?lists={list_id1},{list_id2} endpoint. Use the lists query parameter to specify which lists to use. The response includes contact details, such as contact_id,first_name, last_name, job_title, and more.
Review our permission policy for more information.