Skip to content

Delete group

Endpoint

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

This endpoint deletes an existing group from the 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 a 200 OK status code and a JSON object containing a data

Members > Remove member

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

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.

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.

Groups > Create group

A POST endpoint that creates organizational groups by accepting JSON data containing group name description members and guests while providing code samples in multiple programming languages and returning the newly created group details.