---
title: "API guide: Exporting team membership"
canonical: "https://support.appfire.com/space/FD/1802666033/API%20guide%3A%20Exporting%20team%20membership"
format: markdown
---
> Macro (aura-html)

Team membership defines the relationship between users and teams, and the nature of their relationship. Export your team information either from the in-app download teams button or from the API into a CSV file.

## In-app Team membership download

To download a list of team members:

1. Click **Settings** in Flow's top navigation bar.
2. In the left navigation under *User management*, click **Teams**.
3. Click the **download teams **button on the top right. A CSV file of your team members will download.

## How to export team membership data using the Users API

Follow the directions below to export the following information by team:

- User ID
- Author Name
- Author Email

> ✅ You will have to run this query for every team.

`https://<workspace>.appfireflow.com/v3/customer/core/users/?limit=1000&team__name=YOUR_TEAM_NAME`

- `<workspace>`: Your unique workspace identifier. Find this in the URL you use to access Flow.
- `YOUR_TEAM_NAME`: This is the Flow team for which you’re trying to get user information.

The above API call returns all available fields for each member of the team. You can further refine your results so that you’re only getting the data you want to extract using the fields= parameter as show below:

`https://<workspace>.appfireflow.com/v3/customer/core/users/?limit=1000&team__name=YOUR_TEAM_NAME&fields=id,name,email`

- `fields=id,name,email`: Using the fields parameter will only return these specified fields in your query.

Your results will look something like this:

```
{    "count" : 20 , //total number of Users that met your criteria
"next" : null , // NOTE: If you had more than 1000 Users,
//this tag would help you get the rest of them
"previous" : null ,
"results" : [
{
"id" : 20812395 ,
"name" : "Sally Smith"
"email" : "sally.smith@mycompany.com"
},
...
{
"id" : 3335303 ,
"name" : "Jess Palmere"
"email" " jess.palmere@mycompany.com"
}
]
}
```

If you want user information for all users that are members of a parent team or all its nested child teams in a single call, use the `team_member__path__descendantsin` as your parameter and input the parent `team_id`.

## Export using the Team membership API

Alternatively, you can use the [Team membership API](https://appfire.atlassian.net/wiki/spaces/FD/pages/1802371338) to obtain all teams and their memberships with a single query. You may also use the team name or ID endpoints to narrow your query to a single team.

If you want the user and team relationships for all nested child teams of a parent team, do it in a single call by putting the parent `team_id` in the `team_ancestor_id` parameter.

Once you've identified which fields you would like to export you can append `format=csv` to the end of your query to export it to a CSV file.