Skip to content

Delete group

Endpoint

DELETE /organizations/{org_id}/groups/{group_id}

This endpoint deletes an existing group from your Tallyfy organization. This typically does not delete the members or guests themselves, only the group association.

Request

Replace {org_id} with your Organization ID and {group_id} with the ID of the group to delete.

Headers

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

Body

No request body is needed for this DELETE request.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const groupId = 'GROUP_ID_TO_DELETE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/groups/${groupId}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'DELETE',
headers: headers
})
.then(response => {
if (response.status === 200 || response.status === 204) {
console.log(`Successfully deleted group ${groupId}. Status: ${response.status}`);
if (response.status === 200) {
// Try to parse JSON only if status is 200
return response.json().catch(e => {
console.warn("Could not parse JSON response for 200 status:", e);
return null; // Continue without parsed data
});
}
return null; // For 204 No Content
} else {
// Try to parse error JSON, fallback to text
return response.json()
.catch(() => response.text())
.then(errData => {
console.error(`Failed to delete group ${groupId}. Status: ${response.status}`, errData);
throw new Error(`HTTP error! status: ${response.status}`);
});
}
})
.then(data => {
if (data) {
console.log('Deleted group details (if returned):');
console.log(JSON.stringify(data, null, 2));
}
})
.catch(error => {
console.error(`Error during deletion of group ${groupId}:`, error.message);
});

Response

A successful request returns either a 200 OK status code with a JSON object containing the deleted group details, or a 204 No Content status code indicating successful deletion.

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 > Remove member

The DELETE endpoint enables removal of organization members with optional task reassignment capabilities while preserving their global user account status.

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.

Groups > List groups

The GET endpoint allows retrieving organization-specific groups with their details such as IDs names descriptions logos member lists and timestamps through authenticated API requests using various programming languages.