Skip to content

Update guest

Endpoint

PUT /organizations/{org_id}/guests/{guest_email}

This endpoint updates the details for an existing guest user in your Tallyfy organization, identified by their email address.

Request

Replace {org_id} with your Organization ID and {guest_email} with the URL-encoded email address of the guest 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 guest detail fields you wish to modify.

Refer to the #definitions/createGuestInput schema in Swagger (often the same as creation) for available fields like:

  • first_name (string)
  • last_name (string)
  • phone_1 / phone_2 (string)
  • company_name (string)
  • timezone (string)
  • associated_members (array of integers) - Note: Check if this replaces or appends.

Example Body:

{
"first_name": "UpdatedFirstName",
"company_name": "New Company Name Ltd.",
"phone_1": "+441234567890"
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const guestEmail = "guest.to.update@example.com";
const encodedEmail = encodeURIComponent(guestEmail); // Ensure email is URL encoded
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/guests/${encodedEmail}`;
const updateData = {
first_name: "Guesty",
last_name: "McGuestface",
company_name: "Updated Guest Corp"
};
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 guest ${guestEmail}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully updated guest ${guestEmail}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error updating guest ${guestEmail}:`, error.message);
});

Response

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

{
"data": {
"id": "guest_code_abc123",
"email": "guest.to.update@example.com",
"details": {
"first_name": "Guesty", // Updated value
"last_name": "McGuestface", // Updated value
"company_name": "Updated Guest Corp", // Updated value
// ... other details ...
"updated_at": "2019-09-14T12:30:00Z" // Reflects update time
}
}
}

If the guest email is not found in your Tallyfy organization or the payload is invalid, an appropriate error status code (404, 400, 422) will be returned.


Guests > Create guest

This API endpoint creates new guest user records within a Tallyfy organization by sending a POST request with required email address and optional details like name and company information then returning the created guest data or an error if the email already exists.

Guests > Get guest

This endpoint retrieves specific guest user details from a Tallyfy organization by making a GET request with the guest’s URL-encoded email address and optional query parameters for including related data like statistics.

Guests > Delete guest

A DELETE endpoint that removes guest users from an organization by their email address and returns either a success status code or guest record details upon completion.

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.