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 thefavorite
value totrue
. The default isfalse
. (Optional)description
: Provide a brief description for the list, using up to 255 characters. (Optional)
Example Request
PUT https://api.cc.email/v3/contacts_lists/{list_id}
Endpoint Requirements
User privileges: contacts:write
Authorization scopes: contact_data
OkHttpClient 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();
curl --location --request PUT 'https://api.cc.email/v3/lists/{list_id}' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data-raw '{
"name": "Tier2",
"description": "Tier2 clients",
"favorite": "true"
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.cc.email/v3/lists/{list_id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"name": "Tier2",
"description": "Tier2 clients",
"favorite": "true"
}',
CURLOPT_HTTPHEADER => array(
'Accept: */*',
'Content-Type: application/json',
'Authorization: Bearer {access_token}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
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_id
value 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 (true
orfalse
).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_at
timestamps differs from the `created_at timestamp.
Constant Contact does not sell or rent email addresses. Users are not permitted to upload or use purchased, traded, shared, or borrowed lists to their Constant Contact account.
Review our permission policy for more information.