Channel Groups

The following endpoints are part of the Channels API and allow you to manage channel groups, specifically for the WhatsApp platform. Channel groups are used to group together channel IDs that belong to the same WhatsApp account. This documentation will provide details on how to interact with these endpoints.

List available channel groups

This endpoint retrieves a list of all available channel groups within a workspace. The response includes information such as the unique identifier of each channel group, the WhatsApp platform ID, the platform group ID, the platform group name, and the list of channel IDs associated with the channel group.

List available channel groups

Retrieve a list of all channel groups

GET/workspaces/{workspaceId}/channel-groups
Authorization
Path parameters
workspaceId*string (uuid)

The ID of the workspace

Response

List of available channel groups is returned

Body
resultsarray of ChannelGroup
Request
const response = await fetch('/workspaces/{workspaceId}/channel-groups', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "platformGroupId": "text",
      "platformGroupName": "text",
      "platformId": "text",
      "channelIds": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "createdAt": "2024-12-21T12:10:47.492Z",
      "updatedAt": "2024-12-21T12:10:47.492Z"
    }
  ]
}

Get channel group by ID

This endpoint gets a channel group by group ID and lists all the channels related to the group

Get channel group by ID

Retrieve channel group by it's type

GET/workspaces/{workspaceId}/channel-groups/{channelGroupId}
Authorization
Path parameters
workspaceId*string (uuid)

The ID of the workspace

channelGroupId*string (uuid)

The ID for a channel group

Response

Return channel group

Body
idId-2 (string (uuid))
platformGroupIdPlatformGroupId (string)
platformGroupNamePlatformGroupName (string)
platformIdId (string)
Pattern: ^[A-Za-z0-9-]+$
channelIdsChannelIds (array of string (uuid))
createdAtstring (date-time)
updatedAtstring (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/channel-groups/{channelGroupId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "platformGroupId": "text",
  "platformGroupName": "text",
  "platformId": "text",
  "channelIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "createdAt": "2024-12-21T12:10:47.492Z",
  "updatedAt": "2024-12-21T12:10:47.492Z"
}

Last updated