Skip to content

List groups

Endpoint

GET /organizations/{org_id}/groups

This endpoint retrieves a list of groups defined within the specified organization.

Request

Replace {org_id} with your Organization ID.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Query parameters (optional)

  • with (string): Include additional data, e.g., assets (for group logo).
  • Pagination parameters might be available.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const queryParams = '?with=assets'; // Example: include group logos if available
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/groups${queryParams}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'GET',
headers: headers
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error("Failed to list groups:", data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log('Successfully listed groups:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error('Error listing groups:', error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing a data array. Each element represents a group.

{
"data": [
{
"id": "group_id_abc123", // Unique group ID
"name": "Sales Team",
"description": "Handles all sales inquiries.",
"logo": null, // Or URL if logo uploaded and requested with 'with=assets'
"members": [1001, 1005], // Array of member user IDs
"guests": ["client.a@example.com"], // Array of guest emails
"created_at": "2023-03-10T09:00:00Z",
"updated_at": "2024-04-20T10:00:00Z",
"deleted_at": null
},
{
"id": "group_id_def456",
"name": "Support Tier 1",
// ... other group details ...
}
]
// Potential meta object for pagination
}

Groups > Get group

The GET endpoint allows retrieving detailed information about a specific group within an organization using its unique ID through authenticated API requests with code examples in multiple programming languages.

Members > List members

A comprehensive API endpoint documentation for retrieving organization members through various programming languages including authentication headers optional query parameters and response structure with sample code snippets.

Tags > List tags

The GET endpoint allows retrieval of organizational tags with optional filtering and sorting capabilities returning tag details such as ID title color and usage statistics through authenticated API requests.

Members > Get member

The GET endpoint retrieves detailed profile information of an organization member including their personal details roles permissions and optional related data like stats assets or groups based on the provided user ID.