# 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

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"ChannelGroupList":{"type":"object","title":"ChannelGroupList","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ChannelGroup"}}}},"ChannelGroup":{"type":"object","title":"ChannelGroup","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/Id-2"},"platformGroupId":{"$ref":"#/components/schemas/PlatformGroupId"},"platformGroupName":{"$ref":"#/components/schemas/PlatformGroupName"},"platformId":{"$ref":"#/components/schemas/Id"},"channelIds":{"$ref":"#/components/schemas/ChannelIds"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Id-2":{"type":"string","format":"uuid"},"PlatformGroupId":{"type":"string","minLength":1,"maxLength":250},"PlatformGroupName":{"type":"string","minLength":1,"maxLength":250},"Id":{"type":"string","pattern":"^[A-Za-z0-9-]+$","minLength":3,"maxLength":60},"ChannelIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"paths":{"/workspaces/{workspaceId}/channel-groups":{"get":{"summary":"List available channel groups","operationId":"listChannelGroups","description":"Retrieve a list of all channel groups","tags":["channelgroup"],"responses":{"200":{"description":"List of available channel groups is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelGroupList"}}}}}}}}}
```

## 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

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"ChannelGroup":{"type":"object","title":"ChannelGroup","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/Id-2"},"platformGroupId":{"$ref":"#/components/schemas/PlatformGroupId"},"platformGroupName":{"$ref":"#/components/schemas/PlatformGroupName"},"platformId":{"$ref":"#/components/schemas/Id"},"channelIds":{"$ref":"#/components/schemas/ChannelIds"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Id-2":{"type":"string","format":"uuid"},"PlatformGroupId":{"type":"string","minLength":1,"maxLength":250},"PlatformGroupName":{"type":"string","minLength":1,"maxLength":250},"Id":{"type":"string","pattern":"^[A-Za-z0-9-]+$","minLength":3,"maxLength":60},"ChannelIds":{"type":"array","items":{"type":"string","format":"uuid"}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}}}},"paths":{"/workspaces/{workspaceId}/channel-groups/{channelGroupId}":{"get":{"summary":"Get channel group by ID","operationId":"getChannelGroups","description":"Retrieve channel group by it's type","tags":["channelgroup"],"responses":{"200":{"description":"Return channel group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelGroup"}}}},"404":{"$ref":"#/components/responses/requestError"}}}}}}
```
