Update a Contact List
Make a PUT call to the contact_lists/{list_id} endpoint to update an existing contact list's name, description, or favorite list status.
name: Provide a unique name for the list. (Required)favorite: To allow developers to display favorite lists more prominently in their integration's list view, set thefavoritevalue totrue. The default isfalse. (Optional)description: Provide a brief description for the list, using up to 255 characters. (Optional)
Example Request
https://api.cc.email/v3/contacts_lists/{list_id}Endpoint Requirements
User privileges: contacts:writeAuthorization scopes: contact_dataOkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"Tier2\",\n \"description\": \"Tier2 clients\",\n \"favorite\": \"true\" \n}");
Request request = new Request.Builder()
.url("https://api.cc.email/v3/lists/{list_id}")
.method("PUT", body)
.addHeader("Accept", "*/*")
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.build();
Response response = client.newCall(request).execute();Example Response
{
{
"list_id": "12300452-9e4a-11ec-b208-bdf9196fe06c",
"name": "Tier2",
"description": "Tier2 clients",
"created_at": "2022-03-07T19:09:36Z",
"updated_at": "2022-09-29T17:46:13Z",
"favorite": true
}
}-
list_id: The response includes thelist_idvalue associated with the new list in UUIDs (Universally Unique IDentifier) format; 8-4-4-4-12 with a total of 36 characters (32 alphanumeric characters and four hyphens). -
name: The name of the list. -
favorite: Identifies whether or not the list is a favorite (trueorfalse). -
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.Because this list was updated, the
updated_attimestamps differs from the `created_at timestamp.
Review our permission policy for more information.