curl -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer your_api_key" \
	--data '{ "query": "{ user_groups { name handle members { first_name last_name email } } }" }' \
	https://api.fireflies.ai/graphql
{
  "data": {
    "user_groups": [
      {
        "id": "group_123",
        "name": "Engineering Team",
        "handle": "engineering",
        "members": [
          {
            "user_id": "user_456",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com"
          },
          {
            "user_id": "user_789",
            "first_name": "Jane",
            "last_name": "Smith",
            "email": "jane.smith@example.com"
          }
        ]
      },
      {
        "id": "group_124",
        "name": "Sales Team",
        "handle": "sales",
        "members": [
          {
            "user_id": "user_101",
            "first_name": "Bob",
            "last_name": "Johnson",
            "email": "bob.johnson@example.com"
          }
        ]
      }
    ]
  }
}

Overview

The user_groups query is designed to fetch a list of all user groups within the team. This query allows you to retrieve information about user groups including their members.

Arguments

mine
Boolean
mine is an optional boolean argument. If set to true, returns only user groups that the current user belongs to. If not provided or set to false, returns all user groups in the team.

Schema

Fields available to the UserGroup query

Usage Example

query UserGroups($mine: Boolean) {
  user_groups(mine: $mine) {
    id
    name
    handle
    members {
      user_id
      first_name
      last_name
      email
    }
  }
}
curl -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer your_api_key" \
	--data '{ "query": "{ user_groups { name handle members { first_name last_name email } } }" }' \
	https://api.fireflies.ai/graphql
{
  "data": {
    "user_groups": [
      {
        "id": "group_123",
        "name": "Engineering Team",
        "handle": "engineering",
        "members": [
          {
            "user_id": "user_456",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com"
          },
          {
            "user_id": "user_789",
            "first_name": "Jane",
            "last_name": "Smith",
            "email": "jane.smith@example.com"
          }
        ]
      },
      {
        "id": "group_124",
        "name": "Sales Team",
        "handle": "sales",
        "members": [
          {
            "user_id": "user_101",
            "first_name": "Bob",
            "last_name": "Johnson",
            "email": "bob.johnson@example.com"
          }
        ]
      }
    ]
  }
}

Error Codes

List of possible error codes that may be returned by the user_groups query. Full list of error codes can be found here.

Additional Resources