Skip to content

Update member

Endpoint

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

This endpoint updates the profile information for an existing member (user) within the organization.

Request

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

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 containing the member profile fields you wish to modify.

Refer to the #definitions/accountsInput schema in Swagger for available fields. Common updatable fields include:

  • first_name (string)
  • last_name (string)
  • phone (string)
  • job_title (string)
  • job_description (string)
  • team (string)
  • timezone (string, e.g., Europe/London)
  • country_id (integer): ID representing the user’s country.
  • date_format (string, e.g., mm/dd/yyyy, dd/mm/yyyy).

Example Body:

{
"first_name": "Alicia",
"job_title": "Senior Support Agent",
"timezone": "America/New_York"
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const userId = 12345; // ID of the member to update
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/users/${userId}`;
const updateData = {
last_name: "Smith-Jones",
phone: "+1-555-123-4567",
job_title: "Project Lead"
};
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(updateData)
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error(`Failed to update member ${userId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully updated member ${userId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error updating member ${userId}:`, error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing the full profile of the member after the update.

{
"data": {
"id": 12345,
"email": "specific.user@example.com",
"first_name": "Alicia", // Updated value
"last_name": "Smith-Jones", // Updated value
"full_name": "Alicia Smith-Jones",
"job_title": "Project Lead", // Updated value
"phone": "+1-555-123-4567", // Updated value
"timezone": "America/New_York", // Updated value
// ... other user properties reflecting the current state ...
"last_updated": "2024-05-21T12:00:00Z" // Timestamp reflects the update
}
}

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


Members > Update member role

A PUT endpoint that updates organization member roles with code examples in JavaScript Python Java and Go along with request headers body parameters and expected response format.

Groups > Update group

The PUT endpoint allows updating a group’s details including name description members and guests while returning the modified group data upon successful completion with appropriate status codes.

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.

Guests > Update guest

The PUT endpoint allows modification of existing guest user details through their email address with updated information like name phone and company details while maintaining the original email address.