Skip to content

Update member role

Endpoint

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

This endpoint updates the role of a specific member within your Tallyfy organization.

Request

Replace {org_id} with your Organization ID and {user_id} with the numeric ID of the member whose role you want to change.

Headers

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

Body (JSON)

The request body requires a JSON object specifying the new role.

  • role (string, required): The new role name (such as admin, standard, light). Check your Tallyfy organization settings or documentation for available role names.

Example Body:

{
"role": "light"
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const userId = 12345; // ID of the member whose role to update
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/users/${userId}/role`;
const roleData = {
role: "admin" // Promote to Admin (valid Tallyfy 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 => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error(`Failed to update role for member ${userId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully updated role for member ${userId}:`);
console.log(JSON.stringify(data, null, 2)); // Response likely shows the updated user profile
})
.catch(error => {
console.error(`Error updating role for member ${userId}:`, error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing the member’s full profile, reflecting the updated user_role.

{
"data": {
"id": 12345,
"email": "specific.user@example.com",
"first_name": "Specific",
"last_name": "User",
"user_role": "light", // Role is updated
// ... other user properties ...
"last_updated": "YYYY-MM-DDTHH:mm:ssZ" // Timestamp reflects the update
}
}

If the user ID or role name is invalid, or you lack permission, an appropriate error status code (404, 403, 400, 422) will be returned.


Members > Update member

This endpoint enables updating profile information for existing organization members in Tallyfy by sending a PUT request with JSON data containing fields like first name last name phone job title team and timezone while noting that email and password changes require separate dedicated endpoints for security purposes.

Members > Change the role of a member

Administrators can change member roles in Tallyfy by using to Settings > Organization > Members clicking the member’s name and selecting a new role from the dropdown with changes taking effect immediately.

Groups > Update group

This endpoint allows you to modify an existing group’s properties like name and description as well as its membership by sending a PUT request with the updated fields in JSON format where providing member or guest arrays will completely replace the existing lists rather than incrementally updating them.

Code Samples > Managing members (Users)

The API enables organizations to manage their registered users through functionalities like inviting listing updating and removing members along with their roles and profiles.