Skip to content

Invite member

Endpoint

POST /organizations/{org_id}/users/invite

This endpoint sends an invitation email to a new user, asking them to join your 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)

FieldTypeRequired?Description
emailstringYesEmail address of the person to invite.
first_namestringYesFirst name of the invitee (max 32 characters).
last_namestringYesLast name of the invitee (max 32 characters).
rolestringYesRole to assign: admin, standard, or light.
messagestringYesPersonal message included in the invitation email (max 5000 characters).

Non-admin users can’t assign the admin role. The organization must also allow non-admin users to send invites, or the request will fail.

Example body:

{
"email": "new.user@example.com",
"first_name": "Charlie",
"last_name": "Brown",
"role": "standard",
"message": "Welcome to the team! Looking forward to working with you."
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/users/invite`;
const inviteData = {
email: 'charlie.brown@example.com',
first_name: 'Charlie',
last_name: 'Brown',
role: 'standard',
message: 'Welcome to the team!'
};
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(inviteData)
})
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error('Failed to invite member:', data);
throw new Error(`HTTP ${response.status}: ${data.message || JSON.stringify(data)}`);
}
return data;
});
})
.then(data => {
console.log('Successfully invited member:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error('Error inviting member:', error.message);
});

Response

A successful request returns a 200 OK status. The response body contains the invited user’s profile wrapped in a data object, with a status of invited until they accept.

{
"data": {
"id": 1005,
"email": "charlie.brown@example.com",
"username": null,
"first_name": "Charlie",
"last_name": "Brown",
"full_name": "Charlie Brown",
"profile_pic": null,
"country_id": 1,
"is_active": false,
"last_login_at": null,
"activated_at": null,
"type": null,
"created_at": "2025-01-15T10:00:00Z",
"updated_at": "2025-01-15T10:00:00Z",
"timezone": "America/New_York",
"UTC_offset": "-05:00",
"status": "invited",
"role": "standard",
"invited_by": 501,
"approved_at": "2025-01-15T10:00:00Z"
}
}

If the email already belongs to an existing member, you’ll get a 422 Unprocessable Entity error.


Members > Invite and activate members

Tallyfy lets admins (and optionally Standard members) invite new users by clicking the Invite+ button found throughout the app and entering an email address along with a name and role assignment after which the invitee receives an email to activate their account and join the organization.

Members > Update member role

Tallyfy’s API lets administrators change any organization member’s role to admin or standard or light by sending a PUT request with the new role value to the member’s role endpoint and returning the updated member profile on success.

Guests > Create guest

Tallyfy’s API lets you add external guests to your organization via a POST request with just an email address (plus optional profile fields like name and company) and it automatically links existing global guests instead of creating duplicates.