Skip to content

Update guest

Endpoint

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

This endpoint updates the details for an existing guest user, 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": "2024-05-21T17:00:00Z" // Reflects update time
}
}
}

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


Guests > Create guest

The POST endpoint creates guest users in an organization by accepting JSON data with required email and optional fields like name and company details while returning the newly created guest’s information upon success.

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.

Guests > Get guest

A GET endpoint that retrieves specific guest user details within an organization using their email address while supporting multiple programming languages and optional query parameters for additional data inclusion.

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.