Get Paginated Broadcast Groups

Retrieve and manage WhatsApp broadcast groups efficiently using the DoubleTick API with advanced filtering, sorting, and pagination support. πŸš€

API Endpoint

Use the following endpoint to retrieve paginated broadcast groups:

GET https://public.doubletick.io/groups

Request Headers

{
  "Authorization": "YOUR_API_KEY",
  "Content-Type": "application/json"
}

Query Parameters

ParameterTypeOptionDescription
searchQuerystringgroup_nameThe search query to filter groups
orderBystringNAME, DATE_CREATEDThe field to order the groups by
formatstringASCENDING, DESCENDINGThe order format to apply to the groups
afterGroupIdstringgroup_idThe group ID to fetch the groups after
afterGroupNamestringgroup_nameThe group name to fetch the groups after
afterDateCreateddate-timeYYYY-MM-DDTHH:MM:SSThe group creation date to fetch the groups after

Response

Success Response (201)

{
  "groups": [
    {
      "groupId": "group_id",
      "groupChatName": "broadcast_group_name",
      "memberCount": 5,
      "dateCreated": 1737568528728,
      "lastMessageAt": "2025-01-23T10:04:35.188Z",
      "groupType": "STATIC_SEGMENT",
      "isInternal": false
    }
  ],
  "paginationParams": {
    "hasMore": false
  }
}
  • groups (array): Contains broadcast group details.

    • groupId (string): Unique identifier of the group.
    • groupChatName (string): Name of the broadcast group.
    • memberCount (number): Number of members in the group.
    • dateCreated (number): Timestamp of when the group was created (in milliseconds).
    • lastMessageAt (string): Date and time of the last message sent in the group (ISO format).
    • groupType (string): Type of group, e.g., "STATIC_SEGMENT".
    • isInternal (boolean): Indicates whether the group is internal.
  • paginationParams (object): Contains pagination details.

    • hasMore (boolean): Indicates if more groups are available to fetch.

Bad Request (400)

{
  "message": "error_message",
  "error": "Bad Request",
  "statusCode": 400
}

Unauthorized (401)

{
  "message": "Invalid public api key",
  "error": "Unauthorized",
  "statusCode": 401
}

Best Practices

  • Use pagination (afterGroupId, afterDateCreated) for handling large lists efficiently.
  • Keep track of group IDs for future operations such as adding members or sending messages.
  • Store retrieved data securely for business insights and reporting.

What’s Next

Explore more message types and enhance your WhatsApp communication with DoubleTick API