curl -X POST https://api.fireflies.ai/graphql \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer your_api_key" \
	-d '{
		"query": "mutation($user_id: String!, $role: Role!) { setUserRole(user_id: $user_id, role:$role) { name is_admin } }",
		"variables": {
			"user_id": "your_user_id",
			"role": "admin"
		}
	}'
{
  "data": {
    "setUserRole": {
      "name": "Justin Fly",
      "is_admin": "true",
    }
  }
}

Overview

The setUserRole mutation allows for the updating of a user’s role within a team.

Arguments

user_id
String
required

The unique identifier of the user.

role
Role
required

The Role to be assigned to the user. Valid types for user are admin and user

Usage Example

To set a user’s role, provide the user’s ID and the desired role as arguments to the mutation. Here’s an example of how this mutation could be used:

mutation setUserRole($userId: String!, $role: Role!) {
  setUserRole(user_id: $userId, role: $role) {
    id
    name
    email
    role
  }
}

Additional Resources