Skip to main content
GET
https://api-dev.weir.ai/
/
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": "[email protected]",
        "role": "Team_Lead",
        "joinedAt": "2024-01-15T10:30:00Z",
        "status": "active"
      },
      {
        "userId": "user_987654321",
        "fullname": "Jane Smith",
        "email": "[email protected]",
        "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": "[email protected]",
        "role": "Team_Lead",
        "joinedAt": "2024-01-15T10:30:00Z",
        "status": "active"
      },
      {
        "userId": "user_987654321",
        "fullname": "Jane Smith",
        "email": "[email protected]",
        "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 and x-source: console header.

Path Parameters

teamId
string
required
Unique identifier of the team to retrieve members from.

Response Fields

data
object
required
Team members data object.

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.