Get details about a single tag.

Make a GET call to the /contact_tags/{tag_id} endpoint to get details about a single tag. To include the total number of contacts assigned the tag in the results, use the include_count path parameter and set it to true (/contact_tags/{tag_id}?include_count=true )

The following shows an example response with tag details:

{
    "tag_id": "f0ef8232-24db-11eb-9978-fa163ef30833",
    "name": "Dogs Rule 2020 Donors",
    "tag_source": "JOJO",
    "contacts_count": 50,
    "created_at": "2020-11-12T11:41:02Z",
    "updated_at": "2020-11-12T11:41:02Z"
}

The response body returns the name and tag_id used to uniquely identify the tag, the source used to tag the contact, and timestamps (in ISO format) showing when the tag was first created (created_at) and last updated (updated_at).

Parameters

When making a GET call to the /contact_tags/{tag_id}, use the tag_id path query parameter to return tag details about the specified tag. Use the `contacts_count”: 0,

Authorization Requirements

User privileges: contacts:read

Authorization scopes: contact_data

Example GET Tag Requests

GET https://api.cc.email/v3/contact_tags/{tag_id}

 <?php
 
 $curl = curl_init();
 
 curl_setopt_array($curl, array(
   CURLOPT_URL => "https://api.cc.email/v3/contact_tags/{tag_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 => "GET",
   CURLOPT_HTTPHEADER => array(
     "Authorization: Bearer {access_token}"
   ),
 ));
 
 $response = curl_exec($curl);
 
 curl_close($curl);
 echo $response;

curl --location --request GET 'api.cc.email/v3/contact_tags/{tag_id'} \
--header 'Authorization: Bearer {access_token}'
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.cc.email/v3/contact_tags/{tag_id}")
  .method("GET", null)
  .addHeader("Authorization", "Bearer {access_token}")
  .build();
Response response = client.newCall(request).execute();

Response

 {
     "tag_id": "f0ef8232-24db-11eb-9978-fa163ef30833",
     "name": "Dogs Rule 2020 Donors",
     "tag_source": "JOJO",
     "created_at": "2020-11-12T11:41:02Z",
     "updated_at": "2020-11-12T11:41:02Z"
 }

Try it!