Skip to content

Create guest

Endpoint

POST /organizations/{org_id}/guests

This endpoint creates a new guest user record within the specified Tallyfy organization.

Request

Replace {org_id} with your Organization ID.

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 details of the guest to be created in Tallyfy.

Refer to the #definitions/createGuestInput schema in Swagger for all available properties. Key fields include:

  • email (string, required): The guest’s email address (must be unique within the organization’s guests).
  • first_name (string, optional)
  • last_name (string, optional)
  • phone_1 (string, optional)
  • company_name (string, optional)
  • timezone (string, optional): E.g., Europe/Paris.
  • associated_members (array of integers, optional): User IDs of members associated with this guest.

Minimal Example Body:

{
"email": "new.guest@contractor.com"
}

More Comprehensive Example Body:

{
"email": "client.contact@acme.com",
"first_name": "Client",
"last_name": "Contact",
"company_name": "ACME Corp",
"phone_1": "+1-212-555-0123",
"associated_members": [1001, 1005]
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/guests`;
const guestData = {
email: "external.partner@partnerco.com",
first_name: "External",
last_name: "Partner",
company_name: "Partner Co"
};
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: 'POST',
headers: headers,
body: JSON.stringify(guestData)
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error("Failed to create guest:", data); // Log error details from JSON body
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log('Successfully created guest:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error('Error creating guest:', error.message);
});

Response

A successful request returns a 200 OK or 201 Created status code and a JSON object containing the details of the newly created guest.

{
"data": {
"id": "new_guest_code_789", // Unique ID for this guest
"email": "external.partner@partnerco.com",
"last_accessed_at": null,
"details": {
"first_name": "External",
"last_name": "Partner",
"status": "active",
"company_name": "Partner Co",
// ... other details provided or defaulted ...
"created_at": "...", // Timestamp when guest was created
"updated_at": "..." // Timestamp when guest was last updated
}
}
}

If a guest with the provided email already exists, you will likely receive a 422 Unprocessable Entity error.


Guests > Update guest

This endpoint enables updating existing guest user information in a Tallyfy organization by sending a PUT request with the guest’s URL-encoded email address and a JSON payload containing modifiable fields like name phone and company details.

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.

Members > Invite member

This API endpoint allows organizations to send email invitations to new users by submitting their email address and optional details like name and role through a POST request which returns the invited user’s pending profile information.