Skip to main content

List the Team Members

This article provides an example of calling the List the Team Members API.

tip
  • This API is only available for spaces on the enterprise plan.(Learn more).
  • Only the primary admin and sub-admins who can manage teams and members can use this API.

Example: Get a list of members in a team

Assume that you have a team named "Development Team" and you want to get a list of all members in this team.

Follow these steps:

  1. Get your API token. (How to get it)

  2. Get your space ID. (How to get it)

  3. Get the unitId of the team "Development Team". (How to get it)

    What is unitId?

  4. Open the terminal on your computer and execute the following code to send a query request to the server (assuming spaceId is spcjXzqVrjaP3, unitId of the team is VS1SejiywaMWbiGMEHAohh62T9EPmmlh, sensitiveData is set to true to return the email and mobile phone information of the members):

    curl -X GET \
    "https://aitable.ai/fusion/v1/spaces/spcjXzqVrjaP3/teams/VS1SejiywaMWbiGMEHAohh62T9EPmmlh/members?pageSize=2&pageNum=1&sensitiveData=true" \
    -H "Authorization: Bearer {Your API Token}"
  5. The server will return the following JSON data, with the member information under "data":

    For the meaning of each parameter in the response, please check the API Reference.

    {
    "code": 200,
    "message": "SUCCESS",
    "success": true,
    "data": {
    "total": 2,
    "pageSize": 2,
    "pageNum": 1,
    "members": [
    {
    "unitId": "P8eYsXuL6pZ3mT9cN7gVjKwA2hBq4Ft",
    "name": "John",
    "mobile": {
    "number": "12345678901",
    "areaCode": "+86"
    },
    "email":"john@aitable.ai",
    "avatar": "https://s1.aitable.ai/public/2023/05/16/00a91wbb47fd0594fbc975d2d764a45q",
    "status": 1,
    "type": "PrimaryAdmin",
    "teams": [{
    "unitId": "VS1SejiywaMWbiGMEHAohh62T9EPmmlh",
    "name": "Development Team",
    "sequence": 1,
    "parentUnitId": "YN3YT97EPGL9ZA0loc9V2kNQnWb9ivKW"
    }],
    "roles": [{
    "unitId": "c9EQqwN1pOEgjXqKJznPF6xF8t5TYTf0",
    "name": "Front-end Developer",
    "sequence": 1
    }]
    },
    {
    "unitId": "aDfT7yGpJ5rVcN2xZ8nQzKuWkMl4SbH",
    "name": "Tom"
    "mobile": {
    "number": "13456789012",
    "areaCode": "+86"
    }
    "email": "test2@aitable.ai",
    "avatar": "https://s1.aitable.ai/public/2023/05/16/00a91wbb47fd0594fbc975d2d764a45q",
    "status": 1,
    "type": "Member",
    "teams": [{
    "unitId": "VS1SejiywaMWbiGMEHAohh62T9EPmmlh",
    "name": "Development Team",
    "sequence": 1,
    "parentUnitId": "YN3YT97EPGL9ZA0loc9V2k