> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ruach.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Groups

> Retrieve a list of contact groups

## Get Groups

Retrieve a list of all contact groups in your account.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://app.notify.ng/api/v2/Group?ApiKey=YOUR_API_KEY&ClientId=YOUR_CLIENT_ID" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    ApiKey: 'YOUR_API_KEY',
    ClientId: 'YOUR_CLIENT_ID'
  });

  const response = await fetch(`https://app.notify.ng/api/v2/Group?${params}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.notify.ng/api/v2/Group"
  params = {
      "ApiKey": "YOUR_API_KEY",
      "ClientId": "YOUR_CLIENT_ID"
  }

  response = requests.get(url, params=params)
  data = response.json()
  print(data)
  ```
</CodeGroup>

## Parameters

<ParamField query="ApiKey" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField query="ClientId" type="string" required>
  Your client identifier for authentication
</ParamField>

## Response

<ResponseField name="ErrorCode" type="number">
  Error code (0 for success)
</ResponseField>

<ResponseField name="ErrorDescription" type="string">
  Description of the result
</ResponseField>

<ResponseField name="Data" type="array">
  Array of group objects
</ResponseField>

<ResponseField name="Data[].GroupId" type="number">
  Unique identifier for the group
</ResponseField>

<ResponseField name="Data[].GroupName" type="string">
  Name of the group
</ResponseField>

<ResponseField name="Data[].ContactCount" type="number">
  Number of contacts in the group
</ResponseField>

### Success Response

```json theme={null}
{
  "ErrorCode": 0,
  "ErrorDescription": "Success",
  "Data": [
    {
      "GroupId": 33,
      "GroupName": "JGJ",
      "ContactCount": 21
    },
    {
      "GroupId": 50,
      "GroupName": "6Y5",
      "ContactCount": 0
    }
  ]
}
```

## Use Cases

* **Group management**: View all available contact groups
* **Contact organization**: Organize contacts for targeted messaging
* **Bulk messaging**: Send messages to specific groups
* **Analytics**: Track group sizes and engagement
