> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get team members

> List the members of a team with the Team GraphQL query.

Use the `Team` query to list the members of a team. For example, run it after you [add users to a team](https://docs.prophecy.ai/api-reference/users/invite-users.md) to confirm that they joined.

```
POST /api/md/graphql
```

## Arguments

**uid** `string` *required*

ID (not the name) of the team, as returned in `data.addTeam._id` when you [create the
team](https://docs.prophecy.ai/api-reference/teams/create-team.md).

## Response

**data.Team.name** `string`

Name of the team.

**data.Team.members** `object[]`

Members of the team. Each member has an `_id` (user ID) and an `email`.

```bash cURL theme={null}
QUERY=$(tr '\n' ' ' <<'EOF'
query($team: String!) {
  Team(uid: $team) { name members { _id email } }
}
EOF
)
VARS='{"team": "<TEAM_ID>"}'
curl -sS "$PROPHECY_URL/api/md/graphql" \
  -H "X-Auth-Token: $PROPHECY_TOKEN" -H "Content-Type: application/json" \
  -d "$(printf '{"query": "%s", "variables": %s}' "$QUERY" "$VARS")"
```

```json Response theme={null}
{
  "data": {
    "Team": {
      "name": "analytics_team",
      "members": [
        {
          "_id": "2",
          "email": "user@example.com"
        },
        {
          "_id": "5",
          "email": "new.user@example.com"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.