> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.kollo.ng/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.kollo.ng/_mcp/server.

# Get active members

GET https://rotating_groups/%7Bgroup_id%7D/active_members

# Get Active Members

This endpoint retrieves all active members of a rotating group, including the current user's membership details and information about all other active members in the group.

## Endpoint

**Method:** `GET`\
**Path:** `{{host}}/rotating_groups/{{group_id}}/active_members`

## Required Variables

* `host` - The base URL of the API server
* `group_id` - The unique identifier of the rotating group
* `token` - Authentication token (used in request headers)

## Response Structure

The response contains two main objects:

### currentMembership

Details about the authenticated user's membership in the rotating group:

* `membershipId` (string) - Unique identifier for the membership
* `customerId` (string) - ID of the customer/user
* `groupId` (string) - ID of the rotating group
* `status` (string) - Membership status (e.g., "active")
* `autoContribute` (boolean) - Whether automatic contributions are enabled
* `position` (number) - Member's position in the rotation cycle
* `role` (string) - User's role in the group ("admin" or "member")

### activeMemberships

An array containing all active members in the rotating group. Each member object includes:

* `membershipId` (string) - Unique identifier for the membership
* `customerId` (string) - ID of the customer/user
* `groupId` (string) - ID of the rotating group
* `status` (string) - Membership status
* `autoContribute` (boolean) - Whether automatic contributions are enabled
* `position` (number) - Member's position in the rotation cycle
* `role` (string) - User's role ("admin" or "member")
* `customer` (object) - Detailed customer information:
  * `customerId` (string) - Customer's unique ID
  * `firstName` (string) - Customer's first name
  * `lastName` (string) - Customer's last name
  * `fullName` (string) - Customer's full name
  * `name` (string) - Customer's display name
  * `avatar` (string) - URL to customer's avatar image
  * `isSuspended` (boolean) - Whether the customer account is suspended

## Success Response

**Status Code:** `200 OK`

The response includes a success message and the body containing both the current membership and all active memberships with full customer details.

Reference: https://docs.kollo.ng/kollo-ap-is/rotating-groups/manage/get-active-members

## Authentication

- `Authorization` header (bearer token, required)

## Response

### 200

OK

- `body` (object, required)
  - `currentMembership` (object, required)
    - `membershipId` (string, required)
    - `customerId` (string, required)
    - `groupId` (string, required)
    - `status` (string, required)
    - `autoContribute` (boolean, required)
    - `position` (integer, required)
    - `role` (string, required)
  - `activeMemberships` (list of object, required)
    - `membershipId` (string, required)
    - `customerId` (string, required)
    - `groupId` (string, required)
    - `status` (string, required)
    - `autoContribute` (boolean, required)
    - `position` (integer, required)
    - `role` (string, required)
    - `customer` (object, required)
      - `customerId` (string, required)
      - `firstName` (string, required)
      - `lastName` (string, required)
      - `fullName` (string, required)
      - `avatar` (string, required)
    - `pendingSwap` (object, required)
      - `membershipSwapId` (string, required)
      - `groupId` (string, required)
      - `requesterId` (string, required)
      - `targetId` (string, required)
      - `requesterPosition` (integer, required)
      - `targetPosition` (integer, required)
      - `status` (string, required)
- `message` (string, required)

## Examples

**Response**

```json
{
  "body": {
    "currentMembership": {
      "membershipId": "8aa5134c-1747-4c54-8e3a-d3aa3dd361f8",
      "customerId": "cad93347-d28d-49bc-8960-1c326ad9832e",
      "groupId": "5d3a0675-fa22-4314-a90d-1aec9ad65b5e",
      "status": "active",
      "autoContribute": false,
      "position": 1,
      "role": "admin"
    },
    "activeMemberships": [
      {
        "membershipId": "b1dfc32e-a510-432d-b93f-d099ac5c851a",
        "customerId": "6bddd666-c059-4b01-b171-54ced176e61a",
        "groupId": "5d3a0675-fa22-4314-a90d-1aec9ad65b5e",
        "status": "active",
        "autoContribute": false,
        "position": 2,
        "role": "member",
        "customer": {
          "customerId": "6bddd666-c059-4b01-b171-54ced176e61a",
          "firstName": "Dolapo",
          "lastName": "Daranijo",
          "fullName": "Dolapo Daranijo",
          "avatar": "https://ui-avatars.com/api/?name=Dolapo+Daranijo&background=random"
        },
        "pendingSwap": {
          "membershipSwapId": "2878cd7f-357b-4c08-bb6c-a1797f0548ba",
          "groupId": "5d3a0675-fa22-4314-a90d-1aec9ad65b5e",
          "requesterId": "b1dfc32e-a510-432d-b93f-d099ac5c851a",
          "targetId": "8aa5134c-1747-4c54-8e3a-d3aa3dd361f8",
          "requesterPosition": 2,
          "targetPosition": 1,
          "status": "pending"
        }
      }
    ]
  },
  "message": "Rotating group active memberships fetched"
}
```

**SDK Code**

```python
import requests

url = "https://https/rotating_groups/%7Bgroup_id%7D/active_members"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://https/rotating_groups/%7Bgroup_id%7D/active_members';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/rotating_groups/%7Bgroup_id%7D/active_members"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://https/rotating_groups/%7Bgroup_id%7D/active_members")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/rotating_groups/%7Bgroup_id%7D/active_members")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/rotating_groups/%7Bgroup_id%7D/active_members', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/rotating_groups/%7Bgroup_id%7D/active_members");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/rotating_groups/%7Bgroup_id%7D/active_members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```