Skip to content

Remove member

Endpoint

DELETE /organizations/{org_id}/users/{user_id}

This endpoint removes a member from the organization. This is typically a “soft delete” – the user account may still exist globally but is removed from this specific organization. Their assigned tasks might become unassigned or require reassignment.

Request

Replace {org_id} with your Organization ID and {user_id} with the numeric ID of the member to remove.

Headers

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

Query parameters (optional)

The Swagger definition indicates optional parameters for handling reassignment of the removed member’s tasks:

  • with_reassignment (boolean): Set to true if you want to reassign items.
  • to (integer): If with_reassignment=true, provide the User ID of the member to whom tasks, etc., should be reassigned.

Example: ?with_reassignment=true&to=1002

Body

No request body is needed for this DELETE request.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const userId = 12345; // ID of the member to remove
const reassignToUserId = null; // Optional: Set to ID (number) of member to reassign tasks to
// Construct query string if reassigning
const params = new URLSearchParams();
if (reassignToUserId != null) {
params.append('with_reassignment', 'true');
params.append('to', reassignToUserId.toString());
}
const queryStr = params.toString();
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/users/${userId}${queryStr ? '?' + queryStr : ''}`;
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.ok) { // Expect 200 OK on success usually
// Try to parse error JSON, fallback to text
return response.json()
.catch(() => response.text())
.then(errData => {
console.error(`Failed to remove member ${userId}. Status: ${response.status}`, errData);
throw new Error(`HTTP error! status: ${response.status}`);
});
}
console.log(`Successfully removed member ${userId}. Status: ${response.status}`);
// API might return the details of the removed user
// Use response.text() first as body might be empty or non-json on 200 OK
return response.text().then(text => {
try {
return text ? JSON.parse(text) : null;
} catch (e) {
console.warn("Could not parse response body as JSON:", text);
return null;
}
});
})
.then(data => {
if (data) {
console.log('Removed member details (if returned):');
console.log(JSON.stringify(data, null, 2));
}
})
.catch(error => {
console.error(`Error during removal of member ${userId}:`, error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing a data

Groups > Delete group

A DELETE endpoint removes organizational groups while maintaining individual member and guest accounts by requiring authentication headers and returning status codes 200 or 204 upon successful deletion.

Org Settings > Remove a member

Administrators can remove organization members through Settings while managing their task reassignments and tracking removal activity in member profiles.

Tasks > Delete task

An API endpoint that permanently deletes standalone tasks through DELETE requests with mandatory authorization headers and returns a 204 status code upon successful deletion.

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.