Constant
Contact
API Guide

Get a Collection of Hashtag Groups

To retrieve a paginated list of saved hashtag groups, make a GET call to the /social/hashtags/groups endpoint. A hashtag group is a saved collection of hashtags that can be reused when creating social posts (for example, a TechHashtags group containing coding, devops, and cloud).

Parameters

Include one or more of the following optional URL query parameters:

  • limit (integer, optional): Maximum number of hashtag groups to return per page. Defaults to 5. Maximum is 5.

  • page (integer, optional): 0-based page number to retrieve. Defaults to 0.

Example Request

GET
https://api.cc.email/v3/social/hashtags/groups?limit=5&page=0

Endpoint Requirements

User privileges: campaign:readAuthorization scopes: campaign_data
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
        .url("https://api.cc.email/v3/social/hashtags/groups?limit=5&page=0")
        .get()
        .addHeader("Content-Type", "application/json")
        .addHeader("Authorization", "Bearer {access_token}")
        .build();
Response response = client.newCall(request).execute();

Example Response

The response includes the current page of hashtag_groups, a page object with pagination metadata, and a _links object that contains a next link if more results are available. To retrieve the next page, follow the _links.next.href URL.

{
  "hashtag_groups": [
    {
      "hashtag_group_id": "05cd6c13-9414-4eb5-a988-7389be4d6a5c",
      "hashtag_group_name": "TechHashtags",
      "hashtag_names": [
        "coding",
        "devops",
        "cloud"
      ]
    },
    {
      "hashtag_group_id": "1dcbbca1-0084-429b-97fd-c4120a372dea",
      "hashtag_group_name": "SportsHashtags",
      "hashtag_names": [
        "Running",
        "Marathon",
        "Endurance"
      ]
    }
  ],
  "page": {
    "page": 0,
    "size": 5,
    "total_elements": 7,
    "total_pages": 2
  },
  "_links": {
    "next": {
      "href": "/v3/social/hashtags/groups?limit=5&page=1&size=5"
    }
  }
}

When the current page is the last page, the _links object is empty ({}). If you need to navigate backward, decrement the page query parameter rather than relying on a prev link.

Test the endpoint using our reference tester:

Try it!
Tagssocial

On this page