Skip to content
Developers

Reassign work and remove member

Splitting a member’s work as you remove them

Section titled “Splitting a member’s work as you remove them”

POST /organizations/{org_id}/users/{user_id}/reassign-granular

This deactivates a member in your Tallyfy organization and hands their work to the people you pick, in one call. You can give their templates, template steps and open tasks to different members, one by one or a whole type at once, or take that work away. It removes the member the same way remove member does: they lose access to this organization, but their Tallyfy account isn’t deleted.

You’ll need admin permissions. Bot users can’t be removed. There’s no screen for this in Tallyfy, so you call it through the API.

Call get reassignment options first. It shows what the member holds and gives you the item IDs this call takes.

  • Their open tasks follow your rules. Those are the tasks they’re assigned to or created that aren’t completed, archived or in an archived process.
  • Completed tasks, archived tasks and tasks in archived processes stay with the removed member, so your records still show who did that work. You can’t name them in items.
  • Archived templates keep the removed member as their creator and owner.
  • Every process they started, own or are a member of goes to the default member, archived ones included. You can’t split processes up.
  • Their scheduled jobs go to the default member once the removal is done, but only the jobs that person can run. Any other job stays with the removed member.
  • Tallyfy emails each person who receives work a list of it, but the lists come from a short sample of the member’s work: at most 10 templates, 10 steps, 10 processes, 15 process tasks and 10 one-off tasks. If none of someone’s new work is in that sample, they get no email. Scheduled jobs are never listed, and work you take away isn’t listed to anyone.

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
  • Content-Type: application/json

Every field is optional. Anything no rule covers goes to the default member.

  • default_to_user_id (integer) - The default member. They take every process, and anything you don’t send somewhere else. It must be an active member of this organization, and not the member you’re removing. Leave it out and the default member is you, the administrator making the call.
  • templates, steps and tasks (object) - A rule for every item of that type. Each takes an action of reassign or remove, and with reassign, a to_user_id naming the active member who takes them.
  • items (array, up to 600 entries) - Rules for single items. Each entry takes a type of template, step or task, the item’s id as a string, an action of reassign or remove, and with reassign, a to_user_id. Use the id values from the items lists that get reassignment options returns.

Each item follows the first rule that names it: its own entry in items, then the rule for its type, then the default member. If items names the same ID twice, the first entry counts.

What remove does:

  • For a template, the member stops being a member of it. If they created or own it, that passes to the default member, because a template always needs a creator and an owner.
  • For a step, they’re taken off the template step, and nobody is put in their place.
  • For a task, they’re taken off the task, and nobody is put in their place. If they created it, the default member becomes its creator.
{
"default_to_user_id": 1002,
"templates": { "action": "reassign", "to_user_id": 1003 },
"steps": { "action": "remove" },
"items": [
{ "type": "task", "id": "9f8e7d6c5b4a39281706f5e4d3c2b1a0", "action": "reassign", "to_user_id": 1004 },
{ "type": "task", "id": "0a1b2c3d4e5f60718293a4b5c6d7e8f9", "action": "remove" }
]
}

This gives their templates to member 1003 and takes them off every template step. Member 1004 takes one task, and the member is taken off another. Their other open tasks and all their processes go to member 1002.

An empty body, {}, hands you everything that moves.

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const userId = 12345;
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/users/${userId}/reassign-granular`;
const payload = {
default_to_user_id: 1002,
templates: { action: 'reassign', to_user_id: 1003 },
steps: { action: 'remove' },
items: [
{ type: 'task', id: '9f8e7d6c5b4a39281706f5e4d3c2b1a0', action: 'reassign', to_user_id: 1004 },
{ type: 'task', id: '0a1b2c3d4e5f60718293a4b5c6d7e8f9', action: 'remove' }
]
};
fetch(apiUrl, {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Accept': 'application/json',
'X-Tallyfy-Client': 'APIClient',
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => {
if (!response.ok) {
return response.text().then(body => { throw new Error(`${response.status} ${body}`); });
}
return response.json();
})
.then(data => {
console.log(`Member ${userId} removed:`, data.message);
})
.catch(error => {
console.error(`Error removing member ${userId}:`, error.message);
});

You’ll get 200 OK with a short message. There’s no data object.

{
"message": "User reassigned successfully with granular control"
}

On any error, nobody is removed and nothing moves. The 403 body is plain text. The 404, the 409 and the first three 422 errors below come back in message. The other 422 errors are validation errors, with the message under errors for the field it’s about, such as default_to_user_id or items.0.id.

StatusError messageWhat to do
403Forbidden.Only an administrator can call this. Use an administrator’s access token.
404Resource not foundThe user ID isn’t a member of this organization. Check the ID.
409Someone else is changing this group or one of its tasks right now. Try again in a moment.Someone is changing one of the member’s groups at the same moment. Send the same request again.
422You can't remove a bot user from this organization!Bot users can’t be removed.
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.
422The reassignment target user (ID: 1004) is no longer an active member of this organization.A member you named left the organization while the request ran. Pick someone else.
422The specified default user does not exist.default_to_user_id isn’t an active member of this organization. Pick one who is.
422The default_to_user_id and user being disabled must be different.default_to_user_id is the member you’re removing. Pick someone else.
422You are the member being disabled, so a default_to_user_id is required.You’re removing yourself. Send default_to_user_id with another member’s ID.
422The templates.to_user_id and user being disabled must be different.A to_user_id names the member you’re removing. Pick someone else. Steps, tasks and items get the same message with their own field name.
422A user ID is required when reassigning templates.A reassign rule has no to_user_id. Steps, tasks and items get the same message for their type.
422The specified user for template reassignment does not exist.A to_user_id isn’t an active member of this organization. Steps, tasks and items get the same message for their type.
422Template action must be either "reassign" or "remove".Send reassign or remove. Steps, tasks and items get the same message for their type.
422Item type must be "template", "step" or "task".Fix the entry’s type.
422This template does not belong to the member being disabled in this organization.The ID isn’t one of the member’s templates. Use an ID from the templates items list in get reassignment options.
422This step assignment does not belong to the member being disabled in this organization.The member isn’t assigned to that step. Use an ID from the steps items list.
422This task is not an active, reassignable task of the member being disabled (completed tasks, archived tasks and tasks in archived processes are preserved).The task is completed, archived or in an archived process, or it isn’t theirs. Leave it out.
422Another validation errorA field has the wrong type, an action is missing, or items has more than 600 entries.

Members > Remove member

Tallyfy’s API lets you deactivate a member from your organization using a DELETE request, and…