Listing all communities using APIs
Endpoint Overview
Fetch all community groups associated with your authenticated organization.
- HTTP Method:
GET - Endpoint URL:
https://api.trywhiteowl.com/api/v1/communities - Authentication: Bearer Token (API Key)
Request Headers
Section titled “Request Headers”| Header | Type | Required | Description |
|---|---|---|---|
Authorization |
String | Yes | Bearer token format: Bearer YOUR_API_KEY |
Content-Type |
String | Yes | application/json |
Code Examples
Section titled “Code Examples”cURL
curl -X GET "https://api.trywhiteowl.com/api/v1/communities" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"JavaScript (Fetch)
const options = { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }};
fetch('https://api.trywhiteowl.com/api/v1/communities', options) .then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error(err));Python (Requests)
import requests
url = "https://api.trywhiteowl.com/api/v1/communities"headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}
response = requests.get(url, headers=headers)print(response.json())Response Structure
Section titled “Response Structure”Success Response (200 OK)
{ "success": true, "message": "Communities fetched successfully", "data": [ { "id": "comm_12345", "name": "Developers Circle", "description": "A community space for developer discussions.", "membersCount": 142, "created_at": "2026-02-10T08:15:00Z" } ]}Error Responses
- Internal / Service Error:
{ "success": false, "message": "There was an error getting communities"}