Get all team members
curl --request GET \
--url https://api.vambe.me/api/public/team-members/all \
--header 'x-api-key: <x-api-key>'const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.vambe.me/api/public/team-members/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vambe.me/api/public/team-members/all"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){}Team Management
Get all team members
GET
/
api
/
public
/
team-members
/
all
Get all team members
curl --request GET \
--url https://api.vambe.me/api/public/team-members/all \
--header 'x-api-key: <x-api-key>'const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.vambe.me/api/public/team-members/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vambe.me/api/public/team-members/all"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){}Overview
Retrieve a complete list of all team members (agents) in your organization. This endpoint returns essential information about each team member including their ID, name, email, and phone number. Use this endpoint to display team members in dropdowns, build agent assignment interfaces, or sync team data with external systems.Use Cases
- Agent Assignment UI: Populate dropdowns for assigning conversations to specific agents
- Team Directory: Display a list of all team members in your application
- Reporting & Analytics: Get agent IDs for filtering analytics by team member
- External Integrations: Sync team member data with external CRM or HR systems
- Automated Workflows: Programmatically assign tasks or tickets to specific team members
- Team Management: Build custom team management interfaces
Authentication
This endpoint requires authentication using an API key. Include your API key in the request header:x-api-key: your_api_key_here
Response Structure
The endpoint returns an array of team member objects:Team Member Object
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier for the team member |
name | string | Full name (first name + last name) |
first_name | string | Team memberβs first name |
last_name | string | Team memberβs last name |
email | string | Team memberβs email address |
phone | string | Team memberβs phone number |
Example Response
[
{
"id": "228d7a0d-9072-4ca8-939b-959b75cc606a",
"name": "Maria Rodriguez",
"first_name": "Maria",
"last_name": "Rodriguez",
"email": "maria.rodriguez@company.com",
"phone": "+56912345678"
},
{
"id": "338e8b1e-8183-5db9-a4ab-a6ab86dd717b",
"name": "Carlos Silva",
"first_name": "Carlos",
"last_name": "Silva",
"email": "carlos.silva@company.com",
"phone": "+56987654321"
},
{
"id": "448f9c2f-9294-6eca-b5bc-b7bc97ee828c",
"name": "Ana Martinez",
"first_name": "Ana",
"last_name": "Martinez",
"email": "ana.martinez@company.com",
"phone": "+56911223344"
}
]
Common Use Cases
1. Populate Agent Selection Dropdown
const loadTeamMembers = async () => {
const response = await fetch(
'https://api.vambe.me/api/public/team-members/all',
{
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
const teamMembers = await response.json();
// Convert to dropdown options
const agentOptions = teamMembers.map((member) => ({
value: member.id,
label: member.name,
email: member.email,
}));
return agentOptions;
};
// Use in a select component
// <Select options={agentOptions} onChange={handleAgentSelect} />
2. Find Team Member by Email
const findTeamMemberByEmail = async (emailToFind) => {
const response = await fetch(
'https://api.vambe.me/api/public/team-members/all',
{
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
const teamMembers = await response.json();
const member = teamMembers.find(
(m) => m.email.toLowerCase() === emailToFind.toLowerCase(),
);
if (member) {
console.log(`Found: ${member.name} (ID: ${member.id})`);
return member;
} else {
console.log('Team member not found');
return null;
}
};
3. Display Team Directory
const displayTeamDirectory = async () => {
const response = await fetch(
'https://api.vambe.me/api/public/team-members/all',
{
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
const teamMembers = await response.json();
// Group by first letter of last name
const groupedByLastName = teamMembers.reduce((acc, member) => {
const firstLetter = member.last_name[0].toUpperCase();
if (!acc[firstLetter]) {
acc[firstLetter] = [];
}
acc[firstLetter].push(member);
return acc;
}, {});
console.log('Team Directory:', groupedByLastName);
return groupedByLastName;
};
4. Get Team Member Count and Stats
const getTeamStats = async () => {
const response = await fetch(
'https://api.vambe.me/api/public/team-members/all',
{
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
const teamMembers = await response.json();
const stats = {
totalMembers: teamMembers.length,
membersWithPhone: teamMembers.filter((m) => m.phone).length,
emailDomains: [...new Set(teamMembers.map((m) => m.email.split('@')[1]))],
};
console.log('Team Statistics:', stats);
return stats;
};
5. Sync with External System
const syncTeamMembersToExternalCRM = async () => {
const response = await fetch(
'https://api.vambe.me/api/public/team-members/all',
{
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
const teamMembers = await response.json();
// Sync to external CRM
for (const member of teamMembers) {
await fetch('https://external-crm.com/api/users/sync', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer external_crm_token',
},
body: JSON.stringify({
external_id: member.id,
name: member.name,
email: member.email,
phone: member.phone,
source: 'vambe',
}),
});
}
console.log(`Synced ${teamMembers.length} team members to external CRM`);
};
6. Build Assignment Interface
const buildAssignmentInterface = async (contactId) => {
const response = await fetch(
'https://api.vambe.me/api/public/team-members/all',
{
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
const teamMembers = await response.json();
// Display team members with assign button
return teamMembers.map((member) => ({
id: member.id,
name: member.name,
email: member.email,
assignAction: async () => {
// Use the assign endpoint
await fetch(
`https://api.vambe.me/api/public/contact/${contactId}/assign-team-member/${member.id}`,
{
method: 'POST',
headers: {
'x-api-key': 'your_api_key_here',
},
},
);
console.log(`Assigned ${member.name} to contact ${contactId}`);
},
}));
};
Response Characteristics
- Array Format: Always returns an array, even if empty
- Alphabetical Order: Team members are returned in the order they exist in the database (not sorted)
- Active Members Only: Only returns active team members (not deactivated accounts)
- Organization Scoped: Returns only team members from your organization
Error Responses
| Status Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - No team members found |
| 500 | Internal Server Error - Something went wrong |
Performance Tips
- Cache the Results: Team member lists typically donβt change frequently - consider caching for 5-10 minutes
- Client-side Filtering: After fetching all members, filter on the client side rather than making multiple API calls
- Lazy Loading: For large teams, consider implementing pagination on the frontend
- Update on Changes: Refresh the list when team members are added or removed
Related Endpoints
- POST /api/public/contact//assign-team-member/ - Assign a team member to a contact
- GET /api/public/contact//info - Get contact info including assigned agents
Notes
- Team Member vs Agent: These terms are used interchangeably - a team member is any user who can be assigned to conversations
- Role Information: This endpoint doesnβt return role/permission information - it only returns basic contact details
- ID Format: Team member IDs are UUIDs that can be used with the assignment endpoint
- Name Concatenation: The
namefield is automatically generated fromfirst_name + ' ' + last_name
Headers
API key needed to authorize the request
Response
All team members found.
The response is of type object.
Was this page helpful?
