Skip to content
Developers

Remove member

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

This deactivates a member in your Tallyfy organization. They lose access to this organization, but their Tallyfy account itself isn’t touched. You can also hand their work to one other member as part of the removal: their templates, processes, tasks and scheduled jobs.

You’ll need admin permissions. Bot users can’t be removed through this endpoint.

Deleting a member for good takes two calls to other endpoints, in this order:

  1. Disable: DELETE /organizations/{org_id}/users/{user_id}/disable
  2. Permanently delete: DELETE /organizations/{org_id}/users/{user_id}/delete

The permanent delete endpoint only works on a member you’ve already disabled. Skip that step and you’ll get an error. The main DELETE /organizations/{org_id}/users/{user_id} endpoint on this page doesn’t need the member disabled first. It never deletes the member for good. To do that, see disable, enable or delete member.

Replace {org_id} with your organization ID. Replace {user_id} with the member’s numeric ID.

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient
  • with_reassignment (boolean) - true or 1 hands the member’s work to the person in to as part of the removal. false, 0 or leaving it out deactivates the member without handing anything over, and then you don’t need to. Letter case doesn’t matter, so TRUE works too. Any other value gets 422, and nobody is removed.
  • to (integer) - Required when with_reassignment is true. The user ID of the person taking over. It must be an active member of this organization, not the organization’s bot, and not the member you’re removing. Otherwise you get 422, nobody is removed and nothing moves.

Example: ?with_reassignment=true&to=1002

When with_reassignment is true, the member’s scheduled jobs move to the person in to once the removal is done, but only the jobs that person can run. Any other job stays with the removed member, and its runs fail.

Everything else moves, and the email goes out, only when the member owns or belongs to a template or process, is assigned to a template step, or has unfinished tasks. Otherwise nothing else moves and no email goes out. When there is work to hand over, this moves to the person in to:

  • The templates the member created, owns or is a member of, and their template step assignments.
  • The processes they started, own or are a member of.
  • The tasks they created, and every task assigned to them.

The person taking over then gets an email. Either way, the member’s group memberships end, and any access they had to specific templates or processes isn’t handed over.

You don’t need a request body.

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const userId = 12345;
const reassignToUserId = null; // Set to a user ID to reassign tasks
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 : ''}`;
fetch(apiUrl, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Accept': 'application/json',
'X-Tallyfy-Client': 'APIClient'
}
})
.then(response => {
if (!response.ok) {
return response.json().then(err => { throw new Error(JSON.stringify(err)); });
}
return response.json();
})
.then(data => {
console.log('Member removed:', JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error removing member ${userId}:`, error.message);
});

You’ll get 200 OK. The removed member’s data comes back in a data object.

{
"data": {
"id": 12345,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"role": "standard",
"status": "disabled"
}
}

The first two errors below come back in message. The other 422 errors are validation errors, with the message under errors for the field it’s about.

StatusError messageWhat to do
422You can't remove a bot user from this organization!Bot users can’t be removed through this endpoint.
422Cannot modify the default administrator. Please assign another member as default administrator first.The member is an administrator and no other active administrator exists. Make another member an administrator first.
422with_reassignment must be true or false.Send true, false, 1 or 0, or leave it out. Nobody is removed.
422The member taking over must be an active member of this organization.to isn’t an active member of this organization. Pick one who is. Nobody is removed and nothing moves.
422The organization bot cannot take over a member's work. Pick a member.to is the organization’s bot. Pick a member instead. Nobody is removed and nothing moves.
422The member taking over must be someone other than the member being removed.to is the member you’re removing. Pick someone else. Nobody is removed and nothing moves.
422A validation error on towith_reassignment is true, and to is missing or isn’t a whole number. Nobody is removed.
404User not foundCheck that the user ID exists in this organization.