Skip to content

List groups

Endpoint

GET /organizations/{org_id}/groups

This endpoint retrieves a list of groups defined within your Tallyfy 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 in your Tallyfy organization.

{
"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-01-15T09:00:00Z",
"updated_at": "2023-06-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

This endpoint enables retrieval of all registered members within a Tallyfy organization by making a GET request with optional query parameters for including related group data and pagination controls.

Tags > List tags

This endpoint retrieves all tags within an organization by making a GET request with optional query parameters for searching filtering and pagination while returning tag details like ID title color usage counts and creation timestamps in a JSON response.

Code Samples > Managing groups

API endpoints enable management of organizational groups through creating listing updating and deleting functionalities while organizing members and guests for various tasks.