Skip to content

Update member role

Change a member’s role via API

PUT /organizations/{org_id}/users/{user_id}/role

This endpoint changes a member’s role within your Tallyfy organization. Only administrators can use it.

Request

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

Headers

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

Body (JSON)

Send a JSON object with the new role. The three valid roles are admin, standard, and light.

  • role (string, required): Must be one of admin, standard, or light.
{
"role": "light"
}

Code samples

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}/role`;
const roleData = {
role: "admin" // Valid roles: "admin", "standard", "light"
};
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
headers.append('Content-Type', 'application/json');
fetch(apiUrl, {
method: 'PUT',
headers: headers,
body: JSON.stringify(roleData)
})
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error(`Failed to update role for member ${userId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data;
});
})
.then(data => {
console.log(`Successfully updated role for member ${userId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error updating role for member ${userId}:`, error.message);
});

Response

A 200 OK response returns the member’s full profile with the updated role.

{
"data": {
"id": 12345,
"email": "specific.user@example.com",
"first_name": "Specific",
"last_name": "User",
"role": "light",
// ... other user properties ...
}
}

If the member isn’t found, you’ll get a 404. An invalid role value returns 422. Missing admin permissions returns 403.


Members > Change the role of a member

Administrators in Tallyfy can change any member’s role between Administrator and Standard and Light by going to Settings > Organization > Members and selecting a new role from the dropdown which takes effect immediately.

Members > Update member

Tallyfy’s API lets admins update a member’s profile (name and timezone and optional fields like phone or job title) via a PUT request to /organizations/[org_id]/users/[user_id] and returns the full updated profile on success.

Members > Invite member

Tallyfy’s API lets you invite new users to your organization by sending a POST request with their email and name and role and a personal message to the /users/invite endpoint which returns the invited user’s profile with a status of “invited” until they accept.