curl -X GET 'https://api.weir.ai/org/team/members/team_123456789' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"members": [
{
"userId": "user_123456789",
"fullname": "John Doe",
"email": "john.doe@example.com",
"role": "Team_Lead",
"joinedAt": "2024-01-15T10:30:00Z",
"status": "active"
},
{
"userId": "user_987654321",
"fullname": "Jane Smith",
"email": "jane.smith@example.com",
"role": "Team_Member",
"joinedAt": "2024-01-20T14:15:00Z",
"status": "active"
}
],
"teamId": "team_123456789",
"teamName": "Development Team",
"memberCount": 2
},
"message": "Team members retrieved successfully",
"status": "success"
}
Console APIs - Teams
Get Team Members
Retrieve all members of a specific team
GET
/
org
/
team
/
members
/
:teamId
curl -X GET 'https://api.weir.ai/org/team/members/team_123456789' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"members": [
{
"userId": "user_123456789",
"fullname": "John Doe",
"email": "john.doe@example.com",
"role": "Team_Lead",
"joinedAt": "2024-01-15T10:30:00Z",
"status": "active"
},
{
"userId": "user_987654321",
"fullname": "Jane Smith",
"email": "jane.smith@example.com",
"role": "Team_Member",
"joinedAt": "2024-01-20T14:15:00Z",
"status": "active"
}
],
"teamId": "team_123456789",
"teamName": "Development Team",
"memberCount": 2
},
"message": "Team members retrieved successfully",
"status": "success"
}
Get Team Members
Retrieve a list of all members in a specific team with their roles and details.curl -X GET 'https://api.weir.ai/org/team/members/team_123456789' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"members": [
{
"userId": "user_123456789",
"fullname": "John Doe",
"email": "john.doe@example.com",
"role": "Team_Lead",
"joinedAt": "2024-01-15T10:30:00Z",
"status": "active"
},
{
"userId": "user_987654321",
"fullname": "Jane Smith",
"email": "jane.smith@example.com",
"role": "Team_Member",
"joinedAt": "2024-01-20T14:15:00Z",
"status": "active"
}
],
"teamId": "team_123456789",
"teamName": "Development Team",
"memberCount": 2
},
"message": "Team members retrieved successfully",
"status": "success"
}
Authentication
Requires Console API authentication with bearer token andx-source: console header.
Path Parameters
Unique identifier of the team to retrieve members from.
Response Fields
Team members data object.
Show Team Members Data Properties
Show Team Members Data Properties
Array of team member objects.
Show Member Object Properties
Show Member Object Properties
Unique identifier for the user.
Full name of the team member.
Email address of the team member.
Role of the member in the team.
ISO 8601 formatted timestamp when the member joined the team.
Member status (e.g., “active”, “inactive”, “pending”).
Team identifier.
Name of the team.
Total number of members in the team.
Usage Examples
const getTeamMembers = async (teamId, accessToken) => {
try {
const response = await fetch(`https://api.weir.ai/org/team/members/${teamId}`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'x-source': 'console'
}
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
return data.data;
} catch (error) {
console.error('Get team members error:', error);
throw error;
}
};
// Usage
const teamData = await getTeamMembers('team_123456789', 'your_access_token');
console.log(`Team: ${teamData.teamName}`);
console.log(`Members: ${teamData.memberCount}`);
teamData.members.forEach(member => {
console.log(`- ${member.fullname} (${member.role})`);
});
Pro Tip: Use this endpoint to display team member lists in your UI and enable team management features like role updates and member removal.
Was this page helpful?
⌘I